[PATCH 0/8] MR406: tests: Mark a number of d3d12 tests as broken on WARP.
This is in view of eventually running the vkd3d cross tests in the CI. With this MR d3d12 passes all the tests ([see a test pipeline](https://gitlab.winehq.org/giomasce/vkd3d/-/jobs/32587)), but some shader runner tests are still failing. I haven't investigated in detail all these issues. Also, it is known that WARP doesn't emulate faithfully a hardware device. The idea is that having the CI able to quickly check most (even if not all) our tests on native is still better than nothing. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> A software implementation can conceivably satisfy some requests that cannot work on real hardware. --- tests/d3d12.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index bfbbf804..73b21908 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -1700,28 +1700,36 @@ static void test_create_committed_resource(void) hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource, (void **)&resource); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D12Resource_Release(resource); resource_desc.Width = 31; resource_desc.Height = 32; hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource, (void **)&resource); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D12Resource_Release(resource); resource_desc.Width = 30; resource_desc.Height = 30; hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource, (void **)&resource); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D12Resource_Release(resource); resource_desc.Width = 2; resource_desc.Height = 2; hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource, (void **)&resource); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D12Resource_Release(resource); resource_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE1D; resource_desc.Width = 32; @@ -1778,11 +1786,16 @@ static void test_create_committed_resource(void) hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource, (void **)&resource); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D12Resource_Release(resource); + hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_COPY_SOURCE, NULL, &IID_ID3D12Resource, (void **)&resource); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D12Resource_Release(resource); heap_properties.Type = D3D12_HEAP_TYPE_READBACK; @@ -1801,7 +1814,10 @@ static void test_create_committed_resource(void) hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource, (void **)&resource); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D12Resource_Release(resource); + hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_GENERIC_READ, NULL, &IID_ID3D12Resource, (void **)&resource); -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> WARP has no GPU, so it probably treats GPU handles just like CPU handles. --- tests/d3d12.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 73b21908..c490f281 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -2451,7 +2451,7 @@ static void test_create_descriptor_heap(void) ok(hr == S_OK, "Failed to create descriptor heap, hr %#x.\n", hr); gpu_handle = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap); - ok(!gpu_handle.ptr, "Got unexpected ptr %"PRIx64".\n", gpu_handle.ptr); + ok(!gpu_handle.ptr || broken(test_options.use_warp_device), "Got unexpected ptr %"PRIx64".\n", gpu_handle.ptr); refcount = get_refcount(device); ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount); -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> --- tests/d3d12.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index c490f281..e8f95b30 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -10154,11 +10154,11 @@ static void test_shader_instructions(void) {&ps_movc, {{{1, 1, 1, 1}, {1, 2, 3, 4}, {5, 6, 7, 8}}}, {{1, 2, 3, 4}}}, {&ps_dmov, {.d = {{2.5 + 1.0e-9, -3.5 - 1.0e-9}}}, {.d = {3.5 + 1.0e-9, -2.5 - 1.0e-9}}, true}, - {&ps_dadd, {.d = {{2.5, 0.0}}}, {.d = {2.5 + 1.0000002433080226, 2.5 + 2.000000481493771}}, true}, + {&ps_dadd, {.d = {{2.5, 0.0}}}, {.d = {2.5 + 1.0000002433080226, 2.5 + 2.000000481493771}}, true, false, true}, {&ps_dmin_dmax, {.d = {{-1.0, 1.0}}}, {.d = {-1.0, 1.0}}, true}, {&ps_dfma, {.d = {{1.0000002433080226, 2.000000481493771}}}, {.d = {1.0000002433080226 * 2.000000481493771 + 1.0000002433080226}}, true}, - {&ps_dmovc, {.d = {{0.5, 0.0}}}, {.d = {4.5, 4.5}}, true}, + {&ps_dmovc, {.d = {{0.5, 0.0}}}, {.d = {4.5, 4.5}}, true, false, true}, {&ps_dmovc, {.d = {{1.5, 0.0}}}, {.d = {1.5, 0.0}}, true}, {&ps_dmodifier, {.d = {{1.5, 0.0}}}, {.d = {1.5f, 2.5f}}, true}, {&ps_dmodifier, {.d = {{-1.5, 0.0}}}, {.d = {1.5f, 1.5f}}, true}, -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> There are 12025 failures with WARP. I haven't investigated them. --- tests/d3d12.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index c58b6c28..0be155da 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -19533,6 +19533,12 @@ static void test_get_copyable_footprints(void) }, }; + if (test_options.use_warp_device) + { + skip("Broken on WARP.\n"); + return; + } + if (!(device = create_device())) { skip("Failed to create device.\n"); -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> On WARP 0xffffffff is read instead of zero. --- tests/d3d12.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index e8f95b30..c58b6c28 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -19308,6 +19308,12 @@ static void test_null_vbv(void) }; static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f}; + if (test_options.use_warp_device) + { + skip("Broken on WARP.\n"); + return; + } + memset(&desc, 0, sizeof(desc)); desc.no_root_signature = true; if (!init_test_context(&context, &desc)) -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> The device is eventually lost, indirect commands are likely not supported on WARP. --- tests/d3d12.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index 0be155da..9e859b4f 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -24530,6 +24530,12 @@ static void test_execute_indirect(void) static const uint32_t count_data[] = {2, 1}; static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f}; + if (test_options.use_warp_device) + { + skip("Broken on WARP.\n"); + return; + } + memset(&desc, 0, sizeof(desc)); desc.root_signature_flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT; desc.no_pipeline = true; -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> Most reads on WARP are off by a few units. I haven't investigated the reason. --- tests/d3d12.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index 9e859b4f..02c36c43 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -36063,6 +36063,12 @@ static void test_unbounded_resource_arrays(void) 0x00100556, 0x00000000, 0x01000015, 0x0100003e, }; + if (test_options.use_warp_device) + { + skip("Broken on WARP.\n"); + return; + } + if (!init_compute_test_context(&context)) return; device = context.device; -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> Pipeline creation fails with E_INVALIDARG, atomics are likely not supported on WARP. --- tests/d3d12.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index 02c36c43..c2a6ca92 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -23325,6 +23325,12 @@ static void test_atomic_instructions(void) {{~0u, ~0u}, { 0}, {0xffff, ~0u, 0}, {0xffff, 0, ~0u}}, }; + if (test_options.use_warp_device) + { + skip("Broken on WARP.\n"); + return; + } + memset(&desc, 0, sizeof(desc)); desc.rt_width = 1; desc.rt_height = 1; -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
This merge request was approved by Henri Verbeet. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
participants (3)
-
Giovanni Mascellani -
Giovanni Mascellani (@giomasce) -
Henri Verbeet (@hverbeet)