mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Add a test for compute thread IDs.
This commit is contained in:
committed by
Alexandre Julliard
parent
404a2d6a3d
commit
809a43f06b
Notes:
Alexandre Julliard
2023-01-25 22:44:06 +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/64
@@ -26,11 +26,6 @@
|
||||
static PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER pfn_D3D12CreateVersionedRootSignatureDeserializer;
|
||||
static PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE pfn_D3D12SerializeVersionedRootSignature;
|
||||
|
||||
struct uvec4
|
||||
{
|
||||
unsigned int x, y, z, w;
|
||||
};
|
||||
|
||||
struct ivec4
|
||||
{
|
||||
int x, y, z, w;
|
||||
@@ -41,11 +36,6 @@ struct dvec2
|
||||
double x, y;
|
||||
};
|
||||
|
||||
static bool compare_uvec4(const struct uvec4* v1, const struct uvec4 *v2)
|
||||
{
|
||||
return v1->x == v2->x && v1->y == v2->y && v1->z == v2->z && v1->w == v2->w;
|
||||
}
|
||||
|
||||
static bool compare_uint8(uint8_t a, uint8_t b, unsigned int max_diff)
|
||||
{
|
||||
return abs(a - b) <= max_diff;
|
||||
@@ -725,35 +715,6 @@ static ID3D12CommandSignature *create_command_signature_(unsigned int line,
|
||||
return command_signature;
|
||||
}
|
||||
|
||||
#define init_compute_test_context(context) init_compute_test_context_(__LINE__, context)
|
||||
static bool init_compute_test_context_(unsigned int line, struct test_context *context)
|
||||
{
|
||||
ID3D12Device *device;
|
||||
HRESULT hr;
|
||||
|
||||
memset(context, 0, sizeof(*context));
|
||||
|
||||
if (!(context->device = create_device()))
|
||||
{
|
||||
skip_(line)("Failed to create device.\n");
|
||||
return false;
|
||||
}
|
||||
device = context->device;
|
||||
|
||||
context->queue = create_command_queue_(line, device,
|
||||
D3D12_COMMAND_LIST_TYPE_COMPUTE, D3D12_COMMAND_QUEUE_PRIORITY_NORMAL);
|
||||
|
||||
hr = ID3D12Device_CreateCommandAllocator(device, D3D12_COMMAND_LIST_TYPE_COMPUTE,
|
||||
&IID_ID3D12CommandAllocator, (void **)&context->allocator);
|
||||
ok_(line)(hr == S_OK, "Failed to create command allocator, hr %#x.\n", hr);
|
||||
|
||||
hr = ID3D12Device_CreateCommandList(device, 0, D3D12_COMMAND_LIST_TYPE_COMPUTE,
|
||||
context->allocator, NULL, &IID_ID3D12GraphicsCommandList, (void **)&context->list);
|
||||
ok_(line)(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
struct depth_stencil_resource
|
||||
{
|
||||
ID3D12Resource *texture;
|
||||
|
Reference in New Issue
Block a user