Nikolay Sivov : d3d10/tests: Add a test with fx_4_1 binary.

Alexandre Julliard julliard at winehq.org
Thu Jan 27 15:36:16 CST 2022


Module: wine
Branch: master
Commit: 61d5e8fd1c221311e3923006381477385bb2a386
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=61d5e8fd1c221311e3923006381477385bb2a386

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Jan 26 12:04:49 2022 +0300

d3d10/tests: Add a test with fx_4_1 binary.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d10/tests/effect.c | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c
index dbc4dcf3941..b5df2fd8538 100644
--- a/dlls/d3d10/tests/effect.c
+++ b/dlls/d3d10/tests/effect.c
@@ -8209,6 +8209,43 @@ static void test_effect_value_expression(void)
     ok(!refcount, "Device has %u references left.\n", refcount);
 }
 
+#if 0
+technique10 tech0
+{
+    pass pass0 {}
+};
+#endif
+static DWORD fx_test_fx_4_1[] =
+{
+    0x43425844, 0x228fcf4d, 0x9396b2f5, 0xd817b31f, 0xab6dd460, 0x00000001, 0x000000a0, 0x00000001,
+    0x00000024, 0x30315846, 0x00000074, 0xfeff1011, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000001, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x68636574,
+    0x61700030, 0x00307373, 0x00000004, 0x00000001, 0x00000000, 0x0000000a, 0x00000000, 0x00000000,
+};
+
+static void test_effect_fx_4_1(void)
+{
+    ID3D10Effect *effect;
+    ID3D10Device *device;
+    ULONG refcount;
+    HRESULT hr;
+
+    if (!(device = create_device()))
+    {
+        skip("Failed to create device, skipping tests.\n");
+        return;
+    }
+
+    hr = create_effect(fx_test_fx_4_1, 0, device, NULL, &effect);
+    ok(SUCCEEDED(hr), "Failed to create an effect, hr %#x.\n", hr);
+
+    effect->lpVtbl->Release(effect);
+
+    refcount = ID3D10Device_Release(device);
+    ok(!refcount, "Device has %u references left.\n", refcount);
+}
+
 START_TEST(effect)
 {
     test_effect_constant_buffer_type();
@@ -8235,4 +8272,5 @@ START_TEST(effect)
     test_effect_dynamic_numeric_field();
     test_effect_index_expression();
     test_effect_value_expression();
+    test_effect_fx_4_1();
 }




More information about the wine-cvs mailing list