Refactor/cleanup around wddm

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
Jaroslaw Chodor
2021-05-25 18:42:36 +02:00
committed by Compute-Runtime-Automation
parent 7b2c09eec9
commit a2da0d5e70
29 changed files with 704 additions and 528 deletions

View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/windows/wddm/adapter_factory.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/debug_helpers.h"
#include "shared/source/utilities/stackvec.h"
#include <cstdlib>
#include <cstring>
#include <memory>
namespace NEO {
bool canUseAdapterBasedOnDriverDesc(const char *driverDescription) {
return (strstr(driverDescription, "Intel") != nullptr) ||
(strstr(driverDescription, "Citrix") != nullptr) ||
(strstr(driverDescription, "Virtual Render") != nullptr);
}
bool isAllowedDeviceId(uint32_t deviceId) {
if (DebugManager.flags.ForceDeviceId.get() == "unk") {
return true;
}
char *endptr = nullptr;
auto reqDeviceId = strtoul(DebugManager.flags.ForceDeviceId.get().c_str(), &endptr, 16);
return (static_cast<uint32_t>(reqDeviceId) == deviceId);
}
} // namespace NEO