[PATCH vkd3d 2/7] tests: Test for range overflow in test_root_signature_limits().

Conor McCarthy cmccarthy at codeweavers.com
Thu Jul 29 23:03:15 CDT 2021


Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
---
 tests/d3d12.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/d3d12.c b/tests/d3d12.c
index b10f24be..a03cb965 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -2863,6 +2863,16 @@ static void test_root_signature_limits(void)
     hr = create_root_signature(device, &root_signature_desc, &root_signature);
     ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
 
+    /* Windows results vary for overflowing to zero, but anything beyond that is invalid. */
+    root_signature_desc.NumParameters = 1;
+    descriptor_ranges[0].NumDescriptors = 0x1001;
+    descriptor_ranges[0].OffsetInDescriptorsFromTableStart = 0xFFFFF000;
+    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);
+
     refcount = ID3D12Device_Release(device);
     ok(!refcount, "ID3D12Device has %u references left.\n", (unsigned int)refcount);
 }
-- 
2.32.0




More information about the wine-devel mailing list