libobs: Log Windows 10 Hardware GPU Scheduler
This adds logging for the "Hardware-accelerated GPU Scheduler" (HAGS) introduced with Windows 10 2004 which is known to cause issues with OBS and game performance.
This commit is contained in:
parent
f319b96678
commit
618781e563
@ -199,6 +199,8 @@ static void log_aero(void)
|
||||
L"SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR"
|
||||
#define WIN10_GAME_DVR_REG_KEY L"System\\GameConfigStore"
|
||||
#define WIN10_GAME_MODE_REG_KEY L"Software\\Microsoft\\GameBar"
|
||||
#define WIN10_HAGS_REG_KEY \
|
||||
L"SYSTEM\\CurrentControlSet\\Control\\GraphicsDrivers"
|
||||
|
||||
static void log_gaming_features(void)
|
||||
{
|
||||
@ -210,6 +212,7 @@ static void log_gaming_features(void)
|
||||
struct reg_dword game_dvr_enabled;
|
||||
struct reg_dword game_dvr_bg_recording;
|
||||
struct reg_dword game_mode_enabled;
|
||||
struct reg_dword hags_enabled;
|
||||
|
||||
get_reg_dword(HKEY_CURRENT_USER, WIN10_GAME_BAR_REG_KEY,
|
||||
L"AppCaptureEnabled", &game_bar_enabled);
|
||||
@ -221,6 +224,9 @@ static void log_gaming_features(void)
|
||||
L"HistoricalCaptureEnabled", &game_dvr_bg_recording);
|
||||
get_reg_dword(HKEY_CURRENT_USER, WIN10_GAME_MODE_REG_KEY,
|
||||
L"AllowAutoGameMode", &game_mode_enabled);
|
||||
get_reg_dword(HKEY_LOCAL_MACHINE, WIN10_HAGS_REG_KEY, L"HwSchMode",
|
||||
&hags_enabled);
|
||||
|
||||
if (game_mode_enabled.status != ERROR_SUCCESS) {
|
||||
get_reg_dword(HKEY_CURRENT_USER, WIN10_GAME_MODE_REG_KEY,
|
||||
L"AutoGameModeEnabled", &game_mode_enabled);
|
||||
@ -251,6 +257,11 @@ static void log_gaming_features(void)
|
||||
blog(LOG_INFO, "\tGame Mode: %s",
|
||||
(bool)game_mode_enabled.return_value ? "On" : "Off");
|
||||
}
|
||||
|
||||
if (hags_enabled.status == ERROR_SUCCESS) {
|
||||
blog(LOG_INFO, "\tHardware GPU Scheduler: %s",
|
||||
(hags_enabled.return_value == 2) ? "On" : "Off");
|
||||
}
|
||||
}
|
||||
|
||||
static const char *get_str_for_state(int state)
|
||||
|
Loading…
x
Reference in New Issue
Block a user