From: Conor McCarthy cmccarthy@codeweavers.com
--- tests/d3d12.c | 18 ++++++++++++++++++ tests/d3d12_test_utils.h | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 98cbb054a..797dfe266 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -38627,6 +38627,8 @@ static void test_update_tile_mappings(void) tile_offsets[0] = 0; ID3D12CommandQueue_UpdateTileMappings(context.queue, resource, 1, NULL, NULL, heap, 1, NULL, tile_offsets, NULL, D3D12_TILE_MAPPING_FLAG_NONE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
for (i = 0; i < 64; i++) { @@ -38650,6 +38652,8 @@ static void test_update_tile_mappings(void) ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(context.list, 1, readback_va); ID3D12GraphicsCommandList_Dispatch(context.list, 1, 1, 1); transition_resource_state(context.list, readback_buffer, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
get_buffer_readback_with_command_list(readback_buffer, DXGI_FORMAT_R32_UINT, &rb, context.queue, context.list);
@@ -38679,6 +38683,8 @@ static void test_update_tile_mappings(void)
ID3D12CommandQueue_UpdateTileMappings(context.queue, resource, 6, region_offsets, NULL, heap, 3, NULL, tile_offsets, tile_counts, D3D12_TILE_MAPPING_FLAG_NONE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
set_region_offset(®ion_offsets[0], 24, 0, 0, 0); set_region_offset(®ion_offsets[1], 50, 0, 0, 0); @@ -38715,6 +38721,8 @@ static void test_update_tile_mappings(void)
ID3D12CommandQueue_UpdateTileMappings(context.queue, resource, 5, region_offsets, region_sizes, heap, 6, tile_flags, tile_offsets, tile_counts, D3D12_TILE_MAPPING_FLAG_NONE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
set_region_offset(®ion_offsets[0], 46, 0, 0, 0); set_region_offset(®ion_offsets[1], 44, 0, 0, 0); @@ -38722,6 +38730,8 @@ static void test_update_tile_mappings(void)
ID3D12CommandQueue_CopyTileMappings(context.queue, resource, ®ion_offsets[0], resource, ®ion_offsets[1], ®ion_sizes[0], D3D12_TILE_MAPPING_FLAG_NONE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
reset_command_list(context.list, context.allocator);
@@ -38733,6 +38743,8 @@ static void test_update_tile_mappings(void) ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(context.list, 1, readback_va); ID3D12GraphicsCommandList_Dispatch(context.list, 1, 1, 1); transition_resource_state(context.list, readback_buffer, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
get_buffer_readback_with_command_list(readback_buffer, DXGI_FORMAT_R32_UINT, &rb, context.queue, context.list);
@@ -38808,6 +38820,8 @@ static void test_update_tile_mappings(void) tile_offsets[0] = 0; ID3D12CommandQueue_UpdateTileMappings(context.queue, resource, 1, NULL, NULL, heap, 1, NULL, tile_offsets, NULL, D3D12_TILE_MAPPING_FLAG_NONE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
reset_command_list(context.list, context.allocator);
@@ -38849,6 +38863,8 @@ static void test_update_tile_mappings(void) ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(context.list, 1, readback_va); ID3D12GraphicsCommandList_Dispatch(context.list, 1, 1, 1); transition_resource_state(context.list, readback_buffer, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
get_buffer_readback_with_command_list(readback_buffer, DXGI_FORMAT_R32_UINT, &rb, context.queue, context.list);
@@ -38946,6 +38962,8 @@ static void test_update_tile_mappings(void) ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(context.list, 1, readback_va); ID3D12GraphicsCommandList_Dispatch(context.list, 1, 1, 1); transition_resource_state(context.list, readback_buffer, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); + hr = ID3D12Device_GetDeviceRemovedReason(context.device); + ok(hr == S_OK, "Device removed, hr %#x.\n", hr);
get_buffer_readback_with_command_list(readback_buffer, DXGI_FORMAT_R32_UINT, &rb, context.queue, context.list);
diff --git a/tests/d3d12_test_utils.h b/tests/d3d12_test_utils.h index 4fe6fa716..5376d643b 100644 --- a/tests/d3d12_test_utils.h +++ b/tests/d3d12_test_utils.h @@ -176,7 +176,7 @@ static ID3D12Resource *create_buffer_(unsigned int line, ID3D12Device *device, hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, initial_resource_state, NULL, &IID_ID3D12Resource, (void **)&buffer); - assert_that_(line)(SUCCEEDED(hr), "Failed to create buffer, hr %#x.\n", hr); + assert_that_(line)(SUCCEEDED(hr), "Failed to create buffer, size %u, flags %#x, hr %#x.\n", (int)size, resource_flags, hr); return buffer; }