libobs-d3d11: Don't set GPU priority on Intel adapters

master
jp9000 2019-10-10 03:02:58 -07:00
parent 254947eaa0
commit b7d094a532
1 changed files with 8 additions and 2 deletions

View File

@ -403,6 +403,11 @@ static bool set_priority(ID3D11Device *device)
blog(LOG_INFO, "D3D11 GPU priority setup success");
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)
@ -441,8 +446,9 @@ void gs_device::InitDevice(uint32_t adapterIdx)
/* adjust gpu thread priority */
#if USE_GPU_PRIORITY
if (!set_priority(device)) {
blog(LOG_INFO, "D3D11 GPU priority setup failed (not admin?)");
if (!is_intel(adapterName) && !set_priority(device)) {
blog(LOG_INFO, "D3D11 GPU priority setup "
"failed (not admin?)");
}
#endif