performance: add power throttling debug key

Set windows process power throttling hint to HIGH on wddm init

Related-To: NEO-8215

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2023-12-04 12:06:22 +00:00
committed by Compute-Runtime-Automation
parent 933e5ab818
commit 6cf6a8def8
11 changed files with 134 additions and 2 deletions

View File

@@ -93,6 +93,9 @@ DWORD getFileAttributesResult = TRUE;
size_t setFilePointerCalled = 0u;
DWORD setFilePointerResult = 0;
size_t setProcessPowerThrottlingStateCalled = 0u;
ProcessPowerThrottlingState setProcessPowerThrottlingStateLastValue{};
bool pathExists(const std::string &path) {
std::string tempP1 = path;
if (!path.empty() && path.back() == PATH_SEPARATOR) {
@@ -273,6 +276,11 @@ void coTaskMemFree(LPVOID pv) {
return;
}
void setProcessPowerThrottlingState(ProcessPowerThrottlingState state) {
setProcessPowerThrottlingStateCalled++;
setProcessPowerThrottlingStateLastValue = state;
}
LSTATUS regOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) {
if (regOpenKeySuccessCount > 0) {
regOpenKeySuccessCount--;