mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -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
@ -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)
|
||||
|
Reference in New Issue
Block a user