[v2 PATCH 5/5] d3d10/tests: Add a test for inline geometry shader with stream output declaration.

Matteo Bruni mbruni at codeweavers.com
Tue Aug 31 07:54:09 CDT 2021


From: Nikolay Sivov <nsivov at codeweavers.com>

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
v2 (Matteo): Fix "CompilerShader" typo.

 dlls/d3d10/tests/effect.c | 86 ++++++++++++++++++++++++++++-----------
 1 file changed, 62 insertions(+), 24 deletions(-)

diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c
index da698078f08..70bcf1ea72b 100644
--- a/dlls/d3d10/tests/effect.c
+++ b/dlls/d3d10/tests/effect.c
@@ -2584,14 +2584,20 @@ technique10 Render
         SetVertexShader( v[1] );
         SetGeometryShader( g );
     }
+    pass P8
+    {
+        SetPixelShader( p );
+        SetVertexShader( v[1] );
+        SetGeometryShader( ConstructGSWithSO(CompileShader( gs_4_0, GS()), "SV_POSITION.y") );
+    }
 }
 #endif
 static DWORD fx_local_shader[] =
 {
-    0x43425844, 0x0a74ff0f, 0xea10b516, 0x8be88332, 0x2a273ca7, 0x00000001, 0x0000182d, 0x00000001,
-    0x00000024, 0x30315846, 0x00001801, 0xfeff1001, 0x00000000, 0x00000000, 0x00000007, 0x00000000,
-    0x00000000, 0x00000000, 0x00000001, 0x00001549, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000006, 0x00000000, 0x74726556,
+    0x43425844, 0xd50d5743, 0xb5236e8f, 0x9a35cd8d, 0x59e3afe1, 0x00000001, 0x00001a92, 0x00000001,
+    0x00000024, 0x30315846, 0x00001a66, 0xfeff1001, 0x00000000, 0x00000000, 0x00000007, 0x00000000,
+    0x00000000, 0x00000000, 0x00000001, 0x00001772, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000007, 0x00000000, 0x74726556,
     0x68537865, 0x72656461, 0x00000400, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
     0x00000600, 0x00307600, 0x65786950, 0x6168536c, 0x00726564, 0x00000030, 0x00000002, 0x00000000,
     0x00000000, 0x00000000, 0x00000000, 0x00000005, 0x47003070, 0x656d6f65, 0x53797274, 0x65646168,
@@ -2762,26 +2768,45 @@ static DWORD fx_local_shader[] =
     0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
     0x00000000, 0x00000000, 0x00000003, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
     0x00001320, 0x00000000, 0x50003550, 0x00a50036, 0x00000000, 0x37500000, 0x0000a500, 0x00000100,
-    0x00002d00, 0x00001100, 0x00000000, 0xffffff00, 0x000000ff, 0x00000000, 0x00005800, 0x00003c00,
-    0x00000000, 0xffffff00, 0x000000ff, 0x00000000, 0x00008600, 0x00006a00, 0x00000000, 0xffffff00,
-    0x000000ff, 0x00000000, 0x0000a500, 0x00008900, 0x00000000, 0xffffff00, 0x0000a7ff, 0x00025300,
-    0x00000000, 0x0003ff00, 0x00003c00, 0x00000000, 0xffffff00, 0x000401ff, 0x00000000, 0x0005a900,
-    0x00006a00, 0x00000000, 0xffffff00, 0x0005abff, 0x00000000, 0x0007cf00, 0x0007b300, 0x00000000,
-    0xffffff00, 0x0007d4ff, 0x0009dc00, 0x00000000, 0x0009ea00, 0x00000800, 0x00000000, 0x0009f100,
-    0x00000000, 0x00000000, 0x0009f400, 0x00000300, 0x00000000, 0x00000700, 0x00000000, 0x00000100,
-    0x0009f700, 0x00000600, 0x00000000, 0x00000100, 0x000a0300, 0x00000800, 0x00000000, 0x00000100,
-    0x000a0f00, 0x000a1b00, 0x00000300, 0x00000000, 0x00000700, 0x00000000, 0x00000100, 0x000a1e00,
-    0x00000600, 0x00000000, 0x00000100, 0x000a2a00, 0x00000800, 0x00000000, 0x00000100, 0x000a3600,
-    0x000a4200, 0x00000300, 0x00000000, 0x00000700, 0x00000000, 0x00000700, 0x000bed00, 0x00000600,
-    0x00000000, 0x00000700, 0x000da100, 0x00000800, 0x00000000, 0x00000700, 0x000fb100, 0x000fb900,
-    0x00000300, 0x00000000, 0x00000700, 0x00000000, 0x00000700, 0x00116400, 0x00000600, 0x00000000,
-    0x00000700, 0x00131800, 0x00000800, 0x00000000, 0x00000700, 0x00152800, 0x00153000, 0x00000300,
-    0x00000000, 0x00000700, 0x00000000, 0x00000200, 0x00005800, 0x00000600, 0x00000000, 0x00000200,
-    0x00002d00, 0x00000800, 0x00000000, 0x00000200, 0x00008600, 0x00153300, 0x00000300, 0x00000000,
-    0x00000700, 0x00000000, 0x00000200, 0x0003ff00, 0x00000600, 0x00000000, 0x00000300, 0x00153600,
-    0x00000800, 0x00000000, 0x00000200, 0x0005a900, 0x00153e00, 0x00000300, 0x00000000, 0x00000700,
-    0x00000000, 0x00000200, 0x0003ff00, 0x00000600, 0x00000000, 0x00000300, 0x00154100, 0x00000800,
-    0x00000000, 0x00000200, 0x0005a900, 0x00000000,
+    0x00385000, 0x000000a5, 0x00000001, 0x00000204, 0x43425844, 0x8e325e23, 0x0774e86e, 0xe636e15f,
+    0xd3f67abf, 0x00000001, 0x00000204, 0x00000005, 0x00000034, 0x00000080, 0x000000b4, 0x000000e8,
+    0x00000188, 0x46454452, 0x00000044, 0x00000000, 0x00000000, 0x00000000, 0x0000001c, 0x47530400,
+    0x00000100, 0x0000001c, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168,
+    0x6f432072, 0x6c69706d, 0x31207265, 0x00312e30, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008,
+    0x00000020, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000f0f, 0x505f5653, 0x5449534f,
+    0x004e4f49, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001,
+    0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49, 0x52444853, 0x00000098,
+    0x00020040, 0x00000026, 0x05000061, 0x002010f2, 0x00000003, 0x00000000, 0x00000001, 0x0100185d,
+    0x0100285c, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x0200005e, 0x00000003, 0x06000036,
+    0x001020f2, 0x00000000, 0x00201e46, 0x00000000, 0x00000000, 0x01000013, 0x06000036, 0x001020f2,
+    0x00000000, 0x00201e46, 0x00000001, 0x00000000, 0x01000013, 0x06000036, 0x001020f2, 0x00000000,
+    0x00201e46, 0x00000002, 0x00000000, 0x01000013, 0x01000009, 0x0100003e, 0x54415453, 0x00000074,
+    0x00000008, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003,
+    0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x505f5653, 0x5449534f, 0x2e4e4f49,
+    0x15540079, 0x175c0000, 0x002d0000, 0x00110000, 0x00000000, 0xffff0000, 0x0000ffff, 0x00000000,
+    0x00580000, 0x003c0000, 0x00000000, 0xffff0000, 0x0000ffff, 0x00000000, 0x00860000, 0x006a0000,
+    0x00000000, 0xffff0000, 0x0000ffff, 0x00000000, 0x00a50000, 0x00890000, 0x00000000, 0xffff0000,
+    0x00a7ffff, 0x02530000, 0x00000000, 0x03ff0000, 0x003c0000, 0x00000000, 0xffff0000, 0x0401ffff,
+    0x00000000, 0x05a90000, 0x006a0000, 0x00000000, 0xffff0000, 0x05abffff, 0x00000000, 0x07cf0000,
+    0x07b30000, 0x00000000, 0xffff0000, 0x07d4ffff, 0x09dc0000, 0x00000000, 0x09ea0000, 0x00090000,
+    0x00000000, 0x09f10000, 0x00000000, 0x00000000, 0x09f40000, 0x00030000, 0x00000000, 0x00070000,
+    0x00000000, 0x00010000, 0x09f70000, 0x00060000, 0x00000000, 0x00010000, 0x0a030000, 0x00080000,
+    0x00000000, 0x00010000, 0x0a0f0000, 0x0a1b0000, 0x00030000, 0x00000000, 0x00070000, 0x00000000,
+    0x00010000, 0x0a1e0000, 0x00060000, 0x00000000, 0x00010000, 0x0a2a0000, 0x00080000, 0x00000000,
+    0x00010000, 0x0a360000, 0x0a420000, 0x00030000, 0x00000000, 0x00070000, 0x00000000, 0x00070000,
+    0x0bed0000, 0x00060000, 0x00000000, 0x00070000, 0x0da10000, 0x00080000, 0x00000000, 0x00070000,
+    0x0fb10000, 0x0fb90000, 0x00030000, 0x00000000, 0x00070000, 0x00000000, 0x00070000, 0x11640000,
+    0x00060000, 0x00000000, 0x00070000, 0x13180000, 0x00080000, 0x00000000, 0x00070000, 0x15280000,
+    0x15300000, 0x00030000, 0x00000000, 0x00070000, 0x00000000, 0x00020000, 0x00580000, 0x00060000,
+    0x00000000, 0x00020000, 0x002d0000, 0x00080000, 0x00000000, 0x00020000, 0x00860000, 0x15330000,
+    0x00030000, 0x00000000, 0x00070000, 0x00000000, 0x00020000, 0x03ff0000, 0x00060000, 0x00000000,
+    0x00030000, 0x15360000, 0x00080000, 0x00000000, 0x00020000, 0x05a90000, 0x153e0000, 0x00030000,
+    0x00000000, 0x00070000, 0x00000000, 0x00020000, 0x03ff0000, 0x00060000, 0x00000000, 0x00030000,
+    0x15410000, 0x00080000, 0x00000000, 0x00020000, 0x05a90000, 0x15490000, 0x00030000, 0x00000000,
+    0x00070000, 0x00000000, 0x00020000, 0x03ff0000, 0x00060000, 0x00000000, 0x00030000, 0x154c0000,
+    0x00080000, 0x00000000, 0x00070000, 0x176a0000, 0x00000000,
 };
 
 static void test_effect_local_shader(void)
@@ -3639,6 +3664,19 @@ if (0)
     ok(typedesc.Stride == 0x0, "Stride is %#x, expected 0x0\n", typedesc.Stride);
 
     /* Geometry shader with stream output */
+
+    /* Inline variant */
+    p = t->lpVtbl->GetPassByName(t, "P8");
+    hr = p->lpVtbl->GetGeometryShaderDesc(p, &pdesc);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+    hr = pdesc.pShaderVariable->lpVtbl->GetShaderDesc(pdesc.pShaderVariable, 0, &shaderdesc);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+todo_wine {
+    ok(shaderdesc.IsInline, "Unexpected inline flag.\n");
+    ok(shaderdesc.SODecl && !strcmp(shaderdesc.SODecl, "SV_POSITION.y"), "Unexpected stream output declaration %s.\n",
+                shaderdesc.SODecl);
+}
+
     v = effect->lpVtbl->GetVariableByName(effect, "g_so");
     gs = v->lpVtbl->AsShader(v);
     hr = gs->lpVtbl->GetShaderDesc(gs, 0, &shaderdesc);
-- 
2.26.3




More information about the wine-devel mailing list