obs-qsv11: Remove Intel discrete device ID checking

As Intel continues to add discrete graphics cards, maintaining a long
list of discrete device IDs to check against isn't wise. When i+I
platforms are detected, default to integrated graphics.
master
Christine Lin 2021-10-21 12:23:08 -07:00 committed by Jim
parent 0815d5c887
commit 3995326647
2 changed files with 2 additions and 15 deletions

View File

@ -79,7 +79,6 @@ bool prefer_igpu_enc(int *iGPUIndex)
int adapterIndex = 0;
bool hasIGPU = false;
bool hasDGPU = false;
bool isDG1Primary = false;
HMODULE hDXGI = LoadLibrary(L"dxgi.dll");
if (hDXGI == NULL) {
@ -109,6 +108,7 @@ bool prefer_igpu_enc(int *iGPUIndex)
return false;
}
// Check for i+I cases (Intel discrete + Intel integrated graphics on the same system). Default will be integrated.
while (SUCCEEDED(pFactory->EnumAdapters(adapterIndex, &pAdapter))) {
DXGI_ADAPTER_DESC AdapterDesc = {};
if (SUCCEEDED(pAdapter->GetDesc(&AdapterDesc))) {
@ -122,13 +122,6 @@ bool prefer_igpu_enc(int *iGPUIndex)
} else {
hasDGPU = true;
}
if ((AdapterDesc.DeviceId == 0x4905) ||
(AdapterDesc.DeviceId == 0x4906) ||
(AdapterDesc.DeviceId == 0x4907)) {
if (adapterIndex == 0) {
isDG1Primary = true;
}
}
}
}
adapterIndex++;
@ -138,7 +131,7 @@ bool prefer_igpu_enc(int *iGPUIndex)
pFactory->Release();
FreeLibrary(hDXGI);
return hasIGPU && hasDGPU && isDG1Primary;
return hasIGPU && hasDGPU;
}
void qsv_encoder_version(unsigned short *major, unsigned short *minor)

View File

@ -752,12 +752,6 @@ static void *obs_qsv_create_tex(obs_data_t *settings, obs_encoder_t *encoder)
return obs_encoder_create_rerouted(encoder, "obs_qsv11_soft");
}
if (prefer_igpu_enc(NULL)) {
blog(LOG_INFO,
">>> prefer iGPU encoding, fall back to old qsv encoder");
return obs_encoder_create_rerouted(encoder, "obs_qsv11_soft");
}
blog(LOG_INFO, ">>> new qsv encoder");
return obs_qsv_create(settings, encoder);
}