d3d10core/tests: Add a test for creating SRV for resource without D3D10_BIND_SHADER_RESOURCE.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-09-20 11:39:34 +03:00 committed by Alexandre Julliard
parent dcba4ab532
commit 2515c08bb6
1 changed files with 11 additions and 0 deletions

View File

@ -3578,6 +3578,17 @@ static void test_create_shader_resource_view(void)
ID3D10ShaderResourceView_Release(srview);
ID3D10Buffer_Release(buffer);
/* Without D3D10_BIND_SHADER_RESOURCE. */
buffer = create_buffer(device, 0, 1024, NULL);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)buffer, &srv_desc, &srview);
todo_wine
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
ID3D10ShaderResourceView_Release(srview);
ID3D10Buffer_Release(buffer);
texture2d_desc.Width = 512;
texture2d_desc.Height = 512;
texture2d_desc.SampleDesc.Count = 1;