mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Adding a debug variable to select a test device
Change-Id: Icf28d456590d532db44119d95be35ec6933a2647 Signed-off-by: Andrzej Koska <andrzej.koska@intel.com> Related-To: NEO-3239
This commit is contained in:
committed by
sys_ocldev
parent
81cd28e0f4
commit
0ae977015d
@@ -34,6 +34,7 @@ DECLARE_DEBUG_VARIABLE(bool, AUBDumpAllocsOnEnqueueReadOnly, false, "Force dumpi
|
||||
DECLARE_DEBUG_VARIABLE(bool, AUBDumpForceAllToLocalMemory, false, "Force placing every allocation in local memory address space")
|
||||
|
||||
/*DEBUG FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(std::string, ForceDeviceId, std::string("unk"), "DeviceId selected for testing")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, SchedulerSimulationReturnInstance, 0, "prints execution model related debug information")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, SchedulerGWS, 0, "Forces gws of scheduler kernel, only multiple of 24 allowed or 0 - default selected")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableExperimentalCommandBuffer, 0, "Enables injection of experimental command buffer")
|
||||
|
||||
@@ -263,16 +263,21 @@ bool Wddm::openAdapter() {
|
||||
// be virtualizing one of our adapters) in the description
|
||||
if ((wcsstr(OpenAdapterDesc.Description, L"Intel") != 0) ||
|
||||
(wcsstr(OpenAdapterDesc.Description, L"Citrix") != 0)) {
|
||||
if (wcsstr(OpenAdapterDesc.Description, L"DCH-D") != 0) {
|
||||
if (wcsstr(igdrclPath.c_str(), L"_dch_d.inf") != 0) {
|
||||
char deviceId[16];
|
||||
sprintf_s(deviceId, "%X", OpenAdapterDesc.DeviceId);
|
||||
bool choosenDevice = (DebugManager.flags.ForceDeviceId.get() == "unk") || (DebugManager.flags.ForceDeviceId.get() == deviceId);
|
||||
if (choosenDevice) {
|
||||
if (wcsstr(OpenAdapterDesc.Description, L"DCH-D") != 0) {
|
||||
if (wcsstr(igdrclPath.c_str(), L"_dch_d.inf") != 0) {
|
||||
break;
|
||||
}
|
||||
} else if (wcsstr(OpenAdapterDesc.Description, L"DCH-I") != 0) {
|
||||
if (wcsstr(igdrclPath.c_str(), L"_dch_i.inf") != 0) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else if (wcsstr(OpenAdapterDesc.Description, L"DCH-I") != 0) {
|
||||
if (wcsstr(igdrclPath.c_str(), L"_dch_i.inf") != 0) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,10 +286,9 @@ bool Wddm::openAdapter() {
|
||||
pAdapter = nullptr;
|
||||
}
|
||||
|
||||
OpenAdapterData.AdapterLuid = OpenAdapterDesc.AdapterLuid;
|
||||
status = gdi->openAdapterFromLuid(&OpenAdapterData);
|
||||
|
||||
if (pAdapter != nullptr) {
|
||||
OpenAdapterData.AdapterLuid = OpenAdapterDesc.AdapterLuid;
|
||||
status = gdi->openAdapterFromLuid(&OpenAdapterData);
|
||||
// If an Intel adapter was found, release it here
|
||||
pAdapter->Release();
|
||||
pAdapter = nullptr;
|
||||
@@ -298,6 +302,7 @@ bool Wddm::openAdapter() {
|
||||
adapter = OpenAdapterData.hAdapter;
|
||||
adapterLuid = OpenAdapterDesc.AdapterLuid;
|
||||
}
|
||||
|
||||
return status == STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user