Merge pull request #2124 from notr1ch/pci-device-ids

Use PCI database IDs instead of string matching for devices
This commit is contained in:
Jim
2019-11-22 23:15:55 -08:00
committed by GitHub
2 changed files with 50 additions and 37 deletions

View File

@@ -431,10 +431,6 @@ static bool set_priority(ID3D11Device *device)
return true;
}
static bool is_intel(const wstring &name)
{
return wstrstri(name.c_str(), L"intel") != nullptr;
}
#endif
void gs_device::InitDevice(uint32_t adapterIdx)
@@ -471,9 +467,9 @@ void gs_device::InitDevice(uint32_t adapterIdx)
blog(LOG_INFO, "D3D11 loaded successfully, feature level used: %x",
(unsigned int)levelUsed);
/* adjust gpu thread priority */
/* adjust gpu thread priority on non-intel GPUs*/
#if USE_GPU_PRIORITY
if (!is_intel(adapterName) && !set_priority(device)) {
if (desc.VendorId != 0x8086 && !set_priority(device)) {
blog(LOG_INFO, "D3D11 GPU priority setup "
"failed (not admin?)");
}