Skip to content
Snippets Groups Projects
Commit 92371944 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

d3d11_fmt: simplify the nvidia check

parent b1da4cdd
No related branches found
No related tags found
No related merge requests found
......@@ -334,19 +334,18 @@ bool isXboxHardware(ID3D11Device *d3ddev)
return result;
}
bool isNvidiaHardware(ID3D11Device *d3ddev)
static bool isNvidiaHardware(ID3D11Device *d3ddev)
{
IDXGIAdapter *p_adapter = D3D11DeviceAdapter(d3ddev);
if (!p_adapter)
return NULL;
return false;
bool result = false;
DXGI_ADAPTER_DESC adapterDesc;
if (SUCCEEDED(IDXGIAdapter_GetDesc(p_adapter, &adapterDesc)))
result = adapterDesc.VendorId == GPU_MANUFACTURER_NVIDIA;
if (FAILED(IDXGIAdapter_GetDesc(p_adapter, &adapterDesc)))
adapterDesc.VendorId = 0;
IDXGIAdapter_Release(p_adapter);
return result;
return adapterDesc.VendorId == GPU_MANUFACTURER_NVIDIA;
}
bool CanUseVoutPool(d3d11_device_t *d3d_dev, UINT slices)
......
......@@ -109,7 +109,6 @@ int D3D11_Create(vlc_object_t *, d3d11_handle_t *);
void D3D11_Destroy(d3d11_handle_t *);
bool isXboxHardware(ID3D11Device *d3ddev);
bool isNvidiaHardware(ID3D11Device *d3ddev);
bool CanUseVoutPool(d3d11_device_t *, UINT slices);
IDXGIAdapter *D3D11DeviceAdapter(ID3D11Device *d3ddev);
int D3D11CheckDriverVersion(d3d11_device_t *, UINT vendorId,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment