tests: Test a texture with format DXGI_FORMAT_UNKNOWN in test_create_committed_resource().

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy 2022-01-18 15:07:54 +10:00 committed by Alexandre Julliard
parent e1f2325aec
commit b93edeccfd

View File

@ -1736,6 +1736,12 @@ static void test_create_committed_resource(void)
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
resource_desc.SampleDesc.Count = 1;
resource_desc.Format = DXGI_FORMAT_UNKNOWN;
hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc,
D3D12_RESOURCE_STATE_RENDER_TARGET, &clear_value, &IID_ID3D12Resource, (void **)&resource);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
resource_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE,
&resource_desc, D3D12_RESOURCE_STATE_RENDER_TARGET | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE,
&clear_value, &IID_ID3D12Resource, (void **)&resource);