Conor McCarthy : vkd3d/tests: Add tests for block-compressed texture dimensions.
Alexandre Julliard
julliard at winehq.org
Wed Nov 27 16:32:20 CST 2019
Module: vkd3d
Branch: master
Commit: 23c4dc26e26040ffc9a233b3dcc383d66d1cf29c
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=23c4dc26e26040ffc9a233b3dcc383d66d1cf29c
Author: Conor McCarthy <cmccarthy at codeweavers.com>
Date: Thu Nov 28 00:19:15 2019 +1000
vkd3d/tests: Add tests for block-compressed texture dimensions.
Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tests/d3d12.c | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index 52de007..47c1649 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -1878,6 +1878,49 @@ static void test_create_committed_resource(void)
&IID_ID3D12Resource, (void **)&resource);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ heap_properties.Type = D3D12_HEAP_TYPE_DEFAULT;
+ resource_desc.Format = DXGI_FORMAT_BC1_UNORM;
+ hr = ID3D12Device_CreateCommittedResource(device, &heap_properties, D3D12_HEAP_FLAG_NONE,
+ &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL,
+ &IID_ID3D12Resource, (void **)&resource);
+ ok(hr == S_OK, "Failed to create committed resource, hr %#x.\n", hr);
+ ID3D12Resource_Release(resource);
+
+ resource_desc.Height = 31;
+ 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);
+
+ 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);
+
+ 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);
+
+ 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);
+
+ resource_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE1D;
+ resource_desc.Width = 32;
+ resource_desc.Height = 1;
+ 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);
+
heap_properties.Type = D3D12_HEAP_TYPE_UPLOAD;
resource_desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
More information about the wine-cvs
mailing list