From: Józef Kucia Subject: [PATCH vkd3d 5/9] tests: Skip "ps_movc" on Windows AMD drivers. Message-Id: <20181211144805.31339-5-joseph.kucia@gmail.com> Date: Tue, 11 Dec 2018 15:48:01 +0100 From: Józef Kucia Signed-off-by: Józef Kucia --- tests/d3d12.c | 6 ++++++ tests/d3d12_crosstest.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index c127f6bd1d35..463e3046af66 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -7986,6 +7986,12 @@ static void test_shader_instructions(void) continue; } + if (uint_tests[i].ps == &ps_movc && is_amd_device(context.device)) + { + skip("ps_movc crashes on Windows with AMD GPUs.\n"); + continue; + } + if (current_ps != uint_tests[i].ps) { if (context.pipeline_state) diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h index 00db06407f2f..ee12c891b290 100644 --- a/tests/d3d12_crosstest.h +++ b/tests/d3d12_crosstest.h @@ -294,6 +294,32 @@ static void init_adapter_info(void) IDXGIAdapter_Release(dxgi_adapter); } + +static inline bool is_amd_device(ID3D12Device *device) +{ + DXGI_ADAPTER_DESC desc = {0}; + IDXGIFactory4 *factory; + IDXGIAdapter *adapter; + HRESULT hr; + LUID luid; + + luid = ID3D12Device_GetAdapterLuid(device); + + hr = CreateDXGIFactory1(&IID_IDXGIFactory4, (void **)&factory); + ok(hr == S_OK, "Failed to create IDXGIFactory4, hr %#x.\n", hr); + + hr = IDXGIFactory4_EnumAdapterByLuid(factory, luid, &IID_IDXGIAdapter, (void **)&adapter); + if (SUCCEEDED(hr)) + { + hr = IDXGIAdapter_GetDesc(adapter, &desc); + ok(hr == S_OK, "Failed to get adapter desc, hr %#x.\n", hr); + IDXGIAdapter_Release(adapter); + } + + IDXGIFactory4_Release(factory); + + return desc.VendorId == 0x1002; +} #else static IUnknown *create_adapter(void) { @@ -301,6 +327,11 @@ static IUnknown *create_adapter(void) } static void init_adapter_info(void) {} + +static inline bool is_amd_device(ID3D12Device *device) +{ + return false; +} #endif static ID3D12Device *create_device(void) -- 2.19.2