From 01d2125078e47a71d9a5aac8ec5248b0f6db2178 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 20 Sep 2019 11:39:35 +0300 Subject: [PATCH] d3d11/tests: Add a test for creating SRV for resource without D3D11_BIND_SHADER_RESOURCE. Signed-off-by: Nikolay Sivov Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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 1d7a7c7fe7c..97ab9b4487f 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -4256,6 +4256,17 @@ static void test_create_shader_resource_view(void) ID3D11ShaderResourceView_Release(srview); ID3D11Buffer_Release(buffer); + /* Without D3D11_BIND_SHADER_RESOURCE. */ + buffer = create_buffer(device, 0, 1024, NULL); + + hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)buffer, &srv_desc, &srview); +todo_wine + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D11ShaderResourceView_Release(srview); + + ID3D11Buffer_Release(buffer); + if (feature_level >= D3D_FEATURE_LEVEL_11_0) { buffer_desc.ByteWidth = 1024;