tests: Check depth texture content in test_depth_read_only_view().

This commit is contained in:
Józef Kucia 2017-10-30 14:17:26 +01:00
parent 8a7faf7913
commit 63d5fa5d9c

View File

@ -12390,6 +12390,11 @@ static void test_depth_read_only_view(void)
D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0); check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0);
reset_command_list(command_list, context.allocator);
transition_sub_resource_state(command_list, ds.texture, 0,
D3D12_RESOURCE_STATE_DEPTH_READ, D3D12_RESOURCE_STATE_COPY_SOURCE);
check_sub_resource_float(ds.texture, 0, queue, command_list, 0.5f, 2);
destroy_depth_stencil(&ds); destroy_depth_stencil(&ds);
ID3D12DescriptorHeap_Release(heap); ID3D12DescriptorHeap_Release(heap);
destroy_test_context(&context); destroy_test_context(&context);