Windows returns E_INVALIDARG at least on AMD and Intel. Psychonaughts 2 attempts to create resources with this argument.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- tests/d3d12.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index c027d9b7..066a4346 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -1774,6 +1774,16 @@ static void test_create_committed_resource(void) ID3D12Resource_Release(resource); resource_desc.MipLevels = 1;
+ resource_desc.SampleDesc.Count = 0; + hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE, + &resource_desc, D3D12_RESOURCE_STATE_RENDER_TARGET, &clear_value, + &IID_ID3D12Resource, (void **)&resource); + todo + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + ID3D12Resource_Release(resource); + resource_desc.SampleDesc.Count = 1; + 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);