mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Clear the UAV before testing.
There is no guarantee that a resource is cleared upon creation. This fixes the test on NVIDIA and llvmpipe.
This commit is contained in:
committed by
Alexandre Julliard
parent
5e43f99809
commit
dff22c9ed7
Notes:
Alexandre Julliard
2024-03-11 23:07:26 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/700
@@ -516,10 +516,17 @@ static void test_thread_id(void)
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
const UINT clear_value[4] = {0};
|
||||
|
||||
textures[i] = create_default_texture3d(device, 16, 8, 8, 1, DXGI_FORMAT_R32G32B32A32_UINT,
|
||||
D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
|
||||
ID3D12Device_CreateUnorderedAccessView(device, textures[i], NULL, NULL,
|
||||
get_cpu_descriptor_handle(&context, heap, i));
|
||||
ID3D12GraphicsCommandList_ClearUnorderedAccessViewUint(command_list,
|
||||
get_gpu_descriptor_handle(&context, heap, i),
|
||||
get_cpu_descriptor_handle(&context, heap, i),
|
||||
textures[i], clear_value, 0, NULL);
|
||||
uav_barrier(command_list, textures[i]);
|
||||
}
|
||||
|
||||
cs_code = compile_shader(cs_source, "cs_5_0");
|
||||
|
||||
Reference in New Issue
Block a user