From: Giovanni Mascellani gmascellani@codeweavers.com
--- dlls/d3d11/tests/d3d11.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 7053d32f0db..43b8f1494e8 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -36225,6 +36225,7 @@ static void test_nv12(void) unsigned int test_idx; ID3D10Blob *bytecode; ID3D11Device *device; + UINT support; HRESULT hr;
static const uint32_t clear_values[4] = {0xabcdef00, 0xabcdef00, 0xabcdef00, 0xabcdef00}; @@ -36287,6 +36288,16 @@ static void test_nv12(void) device = test_context.device; device_context = test_context.immediate_context;
+ hr = ID3D11Device_CheckFormatSupport(device, DXGI_FORMAT_NV12, &support); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + if (!(support & D3D11_FORMAT_SUPPORT_TEXTURE2D)) + { + skip("NV12 textures are not supported.\n"); + release_test_context(&test_context); + return; + } + bytecode = compile_shader(cs_code, sizeof(cs_code) - 1, "cs_5_0"); hr = ID3D11Device_CreateComputeShader(device, ID3D10Blob_GetBufferPointer(bytecode), ID3D10Blob_GetBufferSize(bytecode), NULL, &cs);