mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
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.
This commit is contained in:
committed by
Henri Verbeet
parent
f5a26fd2b8
commit
d5410e3115
Notes:
Henri Verbeet
2025-05-15 14:17:53 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1503
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user