Conor McCarthy : tests: Add more tests for invalid descriptor tables.
Alexandre Julliard
julliard at winehq.org
Wed Oct 13 15:53:07 CDT 2021
Module: vkd3d
Branch: master
Commit: 36f6af1570fea155f519c05d074ae269a631bf29
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=36f6af1570fea155f519c05d074ae269a631bf29
Author: Conor McCarthy <cmccarthy at codeweavers.com>
Date: Tue Oct 12 23:50:23 2021 +1000
tests: Add more tests for invalid descriptor tables.
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 | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index 5593393..1b52aa2 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -2703,6 +2703,26 @@ static void test_create_root_signature(void)
hr = create_root_signature(device, &root_signature_desc, &root_signature);
ok(hr == E_INVALIDARG, "Failed to create root signature, hr %#x.\n", hr);
+ /* empty descriptor table */
+ descriptor_ranges[0].NumDescriptors = 0;
+ root_parameters[0].DescriptorTable.NumDescriptorRanges = 1;
+ hr = create_root_signature(device, &root_signature_desc, &root_signature);
+ todo
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ if (SUCCEEDED(hr))
+ ID3D12RootSignature_Release(root_signature);
+
+ /* descriptor range overflow
+ * Windows results vary for overflowing to zero, but anything beyond that is invalid. */
+ descriptor_ranges[0].NumDescriptors = 0x1000;
+ descriptor_ranges[0].BaseShaderRegister = 0xfffff001;
+ root_parameters[0].DescriptorTable.NumDescriptorRanges = 1;
+ hr = create_root_signature(device, &root_signature_desc, &root_signature);
+ todo
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ if (SUCCEEDED(hr))
+ ID3D12RootSignature_Release(root_signature);
+
/* empty root signature */
root_signature_desc.NumParameters = 0;
root_signature_desc.pParameters = NULL;
More information about the wine-cvs
mailing list