Commit 5a6ce11a authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

d3d11: use defines for the manufacturer IDs

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent ad303c60
......@@ -441,6 +441,7 @@ static void D3dDestroyDevice(vlc_va_t *va)
ID3D11VideoContext_Release(sys->d3dvidctx);
D3D11_ReleaseDevice( &sys->d3d_dev );
}
/**
* It describes our Direct3D object
*/
......@@ -450,12 +451,12 @@ static char *DxDescribe(vlc_va_sys_t *sys)
unsigned id;
char name[32];
} vendors [] = {
{ 0x1002, "ATI" },
{ 0x10DE, "NVIDIA" },
{ 0x1106, "VIA" },
{ 0x8086, "Intel" },
{ 0x5333, "S3 Graphics" },
{ 0x4D4F4351, "Qualcomm" },
{ GPU_MANUFACTURER_AMD, "ATI" },
{ GPU_MANUFACTURER_NVIDIA, "NVIDIA" },
{ GPU_MANUFACTURER_VIA, "VIA" },
{ GPU_MANUFACTURER_INTEL, "Intel" },
{ GPU_MANUFACTURER_S3, "S3 Graphics" },
{ GPU_MANUFACTURER_QUALCOMM, "Qualcomm" },
{ 0, "" }
};
......@@ -663,7 +664,7 @@ static bool CanUseDecoderPadding(vlc_va_sys_t *sys)
/* Qualcomm hardware has issues with textures and pixels that should not be
* part of the decoded area */
return adapterDesc.VendorId != 0x4D4F4351;
return adapterDesc.VendorId != GPU_MANUFACTURER_QUALCOMM;
}
/**
......
......@@ -271,9 +271,8 @@ bool isNvidiaHardware(ID3D11Device *d3ddev)
bool result = false;
DXGI_ADAPTER_DESC adapterDesc;
if (SUCCEEDED(IDXGIAdapter_GetDesc(p_adapter, &adapterDesc))) {
result = adapterDesc.VendorId == 0x10DE;
}
if (SUCCEEDED(IDXGIAdapter_GetDesc(p_adapter, &adapterDesc)))
result = adapterDesc.VendorId == GPU_MANUFACTURER_NVIDIA;
IDXGIAdapter_Release(p_adapter);
return result;
......
......@@ -97,6 +97,14 @@ int D3D11_Create(vlc_object_t *, d3d11_handle_t *);
void D3D11_Destroy(d3d11_handle_t *);
#define GPU_MANUFACTURER_AMD 0x1002
#define GPU_MANUFACTURER_NVIDIA 0x10DE
#define GPU_MANUFACTURER_VIA 0x1106
#define GPU_MANUFACTURER_INTEL 0x8086
#define GPU_MANUFACTURER_S3 0x5333
#define GPU_MANUFACTURER_QUALCOMM 0x4D4F4351
bool isXboxHardware(ID3D11Device *d3ddev);
bool isNvidiaHardware(ID3D11Device *d3ddev);
IDXGIAdapter *D3D11DeviceAdapter(ID3D11Device *d3ddev);
......
......@@ -1978,7 +1978,7 @@ static bool CanUseTextureArray(vout_display_t *vd)
return false;
/* ATI/AMD hardware has issues with pixel shaders with Texture2DArray */
if (adapterDesc.VendorId != 0x1002)
if (adapterDesc.VendorId != GPU_MANUFACTURER_AMD)
return true;
#if !VLC_WINSTORE_APP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment