Conor McCarthy : tests: Test for range overflow in test_root_signature_limits().

Alexandre Julliard julliard at winehq.org
Tue Aug 3 16:51:52 CDT 2021


Module: vkd3d
Branch: master
Commit: 50c4e43eaad608b065a8640a3f6cda3d0544659b
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=50c4e43eaad608b065a8640a3f6cda3d0544659b

Author: Conor McCarthy <cmccarthy at codeweavers.com>
Date:   Tue Aug  3 00:43:16 2021 +1000

tests: Test for range overflow in test_root_signature_limits().

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 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/d3d12.c b/tests/d3d12.c
index f90526c..b930855 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -2865,6 +2865,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);
 }




More information about the wine-cvs mailing list