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:
Giovanni Mascellani
2024-03-08 23:38:21 +01:00
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
3 changed files with 18 additions and 11 deletions

View File

@ -269,6 +269,17 @@ static void transition_sub_resource_state(ID3D12GraphicsCommandList *list, ID3D1
ID3D12GraphicsCommandList_ResourceBarrier(list, 1, &barrier);
}
static inline void uav_barrier(ID3D12GraphicsCommandList *list, ID3D12Resource *resource)
{
D3D12_RESOURCE_BARRIER barrier;
barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
barrier.UAV.pResource = resource;
ID3D12GraphicsCommandList_ResourceBarrier(list, 1, &barrier);
}
#define create_command_queue(a, b, c) create_command_queue_(__LINE__, a, b, c)
static inline ID3D12CommandQueue *create_command_queue_(unsigned int line, ID3D12Device *device,
D3D12_COMMAND_LIST_TYPE type, int priority)