tests/d3d12: Add some missing UAV barriers after UAV clears.

Much like e.g. commits a686fa7750 and
93d2bb2d5d.

Direct3D 12 doesn't guarantee any implicit barriers after UAV clears,
but unfortunately missing these is often easy to go unnoticed.
This commit is contained in:
Evan Tang
2025-10-24 12:00:07 -05:00
committed by Henri Verbeet
parent 647482b6f4
commit 96872b941e
Notes: Henri Verbeet 2025-11-25 20:41:51 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1844

View File

@@ -7839,6 +7839,8 @@ static void test_draw_uav_only(void)
ID3D12GraphicsCommandList_ClearUnorderedAccessViewFloat(command_list, ID3D12GraphicsCommandList_ClearUnorderedAccessViewFloat(command_list,
gpu_handle, cpu_handle, resource, zero, 0, NULL); gpu_handle, cpu_handle, resource, zero, 0, NULL);
uav_barrier(command_list, resource);
set_rect(&context.scissor_rect, 0, 0, 1000, 1000); set_rect(&context.scissor_rect, 0, 0, 1000, 1000);
set_viewport(&context.viewport, 0.0f, 0.0f, 1.0f, 100.0f, 0.0f, 0.0f); set_viewport(&context.viewport, 0.0f, 0.0f, 1.0f, 100.0f, 0.0f, 0.0f);
@@ -22807,6 +22809,9 @@ static void test_tgsm(void)
get_cpu_descriptor_handle(&context, cpu_descriptor_heap, 1), get_cpu_descriptor_handle(&context, cpu_descriptor_heap, 1),
buffer2, zero, 0, NULL); buffer2, zero, 0, NULL);
uav_barrier(command_list, buffer);
uav_barrier(command_list, buffer2);
gpu_descriptor_handle = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(descriptor_heap); gpu_descriptor_handle = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(descriptor_heap);
ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state); ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state);
ID3D12GraphicsCommandList_SetComputeRootSignature(command_list, context.root_signature); ID3D12GraphicsCommandList_SetComputeRootSignature(command_list, context.root_signature);
@@ -35281,6 +35286,8 @@ static void test_early_depth_stencil_tests(void)
get_gpu_descriptor_handle(&context, gpu_heap, 0), get_gpu_descriptor_handle(&context, gpu_heap, 0),
get_cpu_descriptor_handle(&context, cpu_heap, 0), texture, values, 0, NULL); get_cpu_descriptor_handle(&context, cpu_heap, 0), texture, values, 0, NULL);
uav_barrier(command_list, texture);
ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle, ID3D12GraphicsCommandList_ClearDepthStencilView(command_list, ds.dsv_handle,
D3D12_CLEAR_FLAG_DEPTH, 0.6f, 0, 0, NULL); D3D12_CLEAR_FLAG_DEPTH, 0.6f, 0, 0, NULL);
ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0); ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0);