mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 10:00:16 +02:00
Windows: Support enabling hardware TSO on Asahi
Relies on a wine-side patch to expose the prctl to the PE-side
This commit is contained in:
1 parent
5b0e703811
commit
0361274366
3 files changed
+20
No files matched your search
@@ -653,6 +653,15 @@ NTSTATUS ProcessInit() {
|
||||
const uintptr_t KiUserExceptionDispatcherFFS = reinterpret_cast<uintptr_t>(GetProcAddress(NtDll, "KiUserExceptionDispatcher"));
|
||||
Exception::KiUserExceptionDispatcher = NtDllRedirectionLUT[KiUserExceptionDispatcherFFS - NtDllBase] + NtDllBase;
|
||||
|
||||
FEX_CONFIG_OPT(TSOEnabled, TSOENABLED);
|
||||
if (TSOEnabled()) {
|
||||
BOOL Enable = TRUE;
|
||||
NTSTATUS Status = NtSetInformationProcess(NtCurrentProcess(), ProcessFexHardwareTso, &Enable, sizeof(Enable));
|
||||
if (Status == STATUS_SUCCESS) {
|
||||
CTX->SetHardwareTSOSupport(true);
|
||||
}
|
||||
}
|
||||
|
||||
FEX_CONFIG_OPT(ProfileStats, PROFILESTATS);
|
||||
FEX_CONFIG_OPT(StartupSleep, STARTUPSLEEP);
|
||||
FEX_CONFIG_OPT(StartupSleepProcName, STARTUPSLEEPPROCNAME);
|
||||
|
||||
@@ -520,6 +520,15 @@ void BTCpuProcessInit() {
|
||||
// wow64.dll will only initialise the cross-process queue if this is set
|
||||
GetTLS().Wow64Info().CpuFlags = WOW64_CPUFLAGS_SOFTWARE;
|
||||
|
||||
FEX_CONFIG_OPT(TSOEnabled, TSOENABLED);
|
||||
if (TSOEnabled()) {
|
||||
BOOL Enable = TRUE;
|
||||
NTSTATUS Status = NtSetInformationProcess(NtCurrentProcess(), ProcessFexHardwareTso, &Enable, sizeof(Enable));
|
||||
if (Status == STATUS_SUCCESS) {
|
||||
CTX->SetHardwareTSOSupport(true);
|
||||
}
|
||||
}
|
||||
|
||||
FEX_CONFIG_OPT(ProfileStats, PROFILESTATS);
|
||||
FEX_CONFIG_OPT(StartupSleep, STARTUPSLEEP);
|
||||
FEX_CONFIG_OPT(StartupSleepProcName, STARTUPSLEEPPROCNAME);
|
||||
|
||||
@@ -452,6 +452,8 @@ typedef enum _MEMORY_INFORMATION_CLASS {
|
||||
MemoryFexStatsShm = 2000,
|
||||
} MEMORY_INFORMATION_CLASS;
|
||||
|
||||
#define ProcessFexHardwareTso (PROCESSINFOCLASS)2000
|
||||
|
||||
typedef enum _KEY_VALUE_INFORMATION_CLASS {
|
||||
KeyValueBasicInformation,
|
||||
KeyValueFullInformation,
|
||||
|
||||
Reference in new issue
Block a user