From d5410e3115415ee8689c625fe06d88a6fef12869 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Sat, 12 Apr 2025 15:01:03 +0200 Subject: [PATCH] tests: Expect success when creating resources in certain cases. Currently the tests expect that creating buffers in COMMON or COPY_SOURCE state on UPLOAD heaps or in COMMON state on READBACK heaps leads to a failure. I tested WARP, AMD and NVIDIA, and in all cases the operations is successful. I think the D3D12 runtime used reject resources created in the configurations detailed above, but it doesn't any more (both using the latest Agility SDK and the runtime distributed with an updated Windows 11 system). However the CI still uses an earlier runtime, so the old behavior is still allowed as broken. --- tests/d3d12.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 788ad66e7..1bd3cc61e 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -1808,18 +1808,17 @@ static void test_create_committed_resource(void) &IID_ID3D12Resource, (void **)&resource); ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); - /* For D3D12_HEAP_TYPE_UPLOAD the state must be D3D12_RESOURCE_STATE_GENERIC_READ. */ 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 || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + todo ok(hr == S_OK || broken(hr == E_INVALIDARG), "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 || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + todo ok(hr == S_OK || broken(hr == E_INVALIDARG), "Got unexpected hr %#x.\n", hr); if (SUCCEEDED(hr)) ID3D12Resource_Release(resource); @@ -1836,11 +1835,10 @@ static void test_create_committed_resource(void) refcount = ID3D12Resource_Release(resource); ok(!refcount, "ID3D12Resource has %u references left.\n", (unsigned int)refcount); - /* For D3D12_HEAP_TYPE_READBACK the state must be D3D12_RESOURCE_STATE_COPY_DEST. */ 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 || broken(test_options.use_warp_device), "Got unexpected hr %#x.\n", hr); + todo ok(hr == S_OK || broken(hr == E_INVALIDARG), "Got unexpected hr %#x.\n", hr); if (SUCCEEDED(hr)) ID3D12Resource_Release(resource);