[PATCH vkd3d 38/41] vkd3d: Add DXIL test for combined ClipCull.

Hans-Kristian Arntzen post at arntzen-software.no
Wed Jan 29 05:52:14 CST 2020


Signed-off-by: Hans-Kristian Arntzen <post at arntzen-software.no>
---
 tests/d3d12.c | 196 +++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 161 insertions(+), 35 deletions(-)

diff --git a/tests/d3d12.c b/tests/d3d12.c
index 122ae9a..147e6b8 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -31566,7 +31566,7 @@ static void test_clip_distance_dxil(void)
     test_clip_distance(true);
 }
 
-static void test_combined_clip_and_cull_distances(void)
+static void test_combined_clip_and_cull_distances(bool use_dxil)
 {
     ID3D12GraphicsCommandList *command_list;
     D3D12_INPUT_LAYOUT_DESC input_layout;
@@ -31579,40 +31579,40 @@ static void test_combined_clip_and_cull_distances(void)
     ID3D12Device *device;
     unsigned int i, j, k;
 
-    static const DWORD vs_code[] =
-    {
 #if 0
-        struct input
-        {
-            float4 position : POSITION;
-            float clip0 : CLIP_DISTANCE0;
-            float clip1 : CLIP_DISTANCE1;
-            float clip2 : CLIP_DISTANCE2;
-            float clip3 : CLIP_DISTANCE3;
-            float cull0 : CULL_DISTANCE0;
-            float cull1 : CULL_DISTANCE1;
-            float cull2 : CULL_DISTANCE2;
-            float cull3 : CULL_DISTANCE3;
-        };
+    struct input
+    {
+        float4 position : POSITION;
+        float clip0 : CLIP_DISTANCE0;
+        float clip1 : CLIP_DISTANCE1;
+        float clip2 : CLIP_DISTANCE2;
+        float clip3 : CLIP_DISTANCE3;
+        float cull0 : CULL_DISTANCE0;
+        float cull1 : CULL_DISTANCE1;
+        float cull2 : CULL_DISTANCE2;
+        float cull3 : CULL_DISTANCE3;
+    };
 
-        struct vertex
-        {
-            float4 position : SV_Position;
-            float3 clip0 : SV_ClipDistance1;
-            float3 cull0 : SV_CullDistance1;
-            float clip1 : SV_ClipDistance2;
-            float cull1 : SV_CullDistance2;
-        };
+    struct vertex
+    {
+        float4 position : SV_Position;
+        float3 clip0 : SV_ClipDistance1;
+        float3 cull0 : SV_CullDistance1;
+        float clip1 : SV_ClipDistance2;
+        float cull1 : SV_CullDistance2;
+    };
 
-        void main(input vin, out vertex vertex)
-        {
-            vertex.position = vin.position;
-            vertex.clip0 = float3(vin.clip0, vin.clip1, vin.clip2);
-            vertex.cull0 = float3(vin.cull0, vin.cull1, vin.cull2);
-            vertex.clip1 = vin.clip3;
-            vertex.cull1 = vin.cull3;
-        }
+    void main(input vin, out vertex vertex)
+    {
+        vertex.position = vin.position;
+        vertex.clip0 = float3(vin.clip0, vin.clip1, vin.clip2);
+        vertex.cull0 = float3(vin.cull0, vin.cull1, vin.cull2);
+        vertex.clip1 = vin.clip3;
+        vertex.cull1 = vin.cull3;
+    }
 #endif
+    static const DWORD vs_code_dxbc[] =
+    {
         0x43425844, 0xa24fb3ea, 0x92e2c2b0, 0xb599b1b9, 0xd671f830, 0x00000001, 0x00000374, 0x00000003,
         0x0000002c, 0x0000013c, 0x000001f0, 0x4e475349, 0x00000108, 0x00000009, 0x00000008, 0x000000e0,
         0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x000000e9, 0x00000000, 0x00000000,
@@ -31642,7 +31642,107 @@ static void test_combined_clip_and_cull_distances(void)
         0x0010100a, 0x00000006, 0x05000036, 0x00102042, 0x00000002, 0x0010100a, 0x00000007, 0x05000036,
         0x00102082, 0x00000002, 0x0010100a, 0x00000008, 0x0100003e,
     };
-    static const D3D12_SHADER_BYTECODE vs = {vs_code, sizeof(vs_code)};
+    static const BYTE vs_code_dxil[] =
+    {
+        0x44, 0x58, 0x42, 0x43, 0x58, 0xbc, 0x5d, 0xad, 0xbf, 0x11, 0x93, 0x02, 0x79, 0x8c, 0xb2, 0x4d, 0x39, 0x1a, 0x1c, 0x6f, 0x01, 0x00, 0x00, 0x00, 0xb5, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+        0x34, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0xed, 0x01, 0x00, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x05, 0x05, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0xa1, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4c, 0x49,
+        0x50, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x4c, 0x49, 0x50, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x4c, 0x49, 0x50, 0x5f, 0x44, 0x49,
+        0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x4c, 0x49, 0x50, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x55, 0x4c, 0x4c, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e,
+        0x43, 0x45, 0x00, 0x43, 0x55, 0x4c, 0x4c, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x55, 0x4c, 0x4c, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43,
+        0x55, 0x4c, 0x4c, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x4f, 0x53, 0x47, 0x31, 0xd4, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0xb4, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0xc4, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0xc4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f,
+        0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x53, 0x56, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x53, 0x56, 0x5f, 0x43, 0x75, 0x6c, 0x6c,
+        0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x50, 0x53, 0x56, 0x30, 0x34, 0x02, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x09, 0x05, 0x00, 0x09, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00,
+        0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4c, 0x49, 0x50, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x4c, 0x49, 0x50, 0x5f, 0x44, 0x49,
+        0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x4c, 0x49, 0x50, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x4c, 0x49, 0x50, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e,
+        0x43, 0x45, 0x00, 0x43, 0x55, 0x4c, 0x4c, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x55, 0x4c, 0x4c, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43,
+        0x55, 0x4c, 0x4c, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x43, 0x55, 0x4c, 0x4c, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44,
+        0x00, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x41, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02, 0x41,
+        0x00, 0x03, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x03, 0x41, 0x00, 0x03, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x04, 0x41,
+        0x00, 0x03, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x41, 0x00, 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x41,
+        0x00, 0x03, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x07, 0x41, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x08, 0x41,
+        0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x43,
+        0x06, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02, 0x43, 0x07, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x71,
+        0x06, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02, 0x71, 0x07, 0x03, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
+        0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0xa8, 0x06, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0xaa, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00,
+        0x00, 0x90, 0x06, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xa1, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23,
+        0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32,
+        0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81,
+        0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff,
+        0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00,
+        0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x23,
+        0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, 0x02, 0x30, 0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, 0x81, 0x80, 0x1c, 0x21, 0x00, 0x00, 0x13, 0x14, 0x72,
+        0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0,
+        0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72,
+        0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07,
+        0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30,
+        0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x15, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26,
+        0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28, 0x84, 0x62, 0x28, 0x82, 0x32, 0x28, 0x85, 0x72, 0x28, 0x08, 0xaa, 0x92, 0x18, 0x01, 0x28, 0x84, 0x12, 0x28, 0x83, 0x62, 0x28, 0x82, 0x72,
+        0xa0, 0x1d, 0x6b, 0x0c, 0xc2, 0x80, 0x09, 0x04, 0x02, 0x81, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x40,
+        0x30, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0xc4, 0x88, 0x0c, 0x6f, 0xec, 0xed, 0x4d, 0x0c,
+        0x44, 0x06, 0x26, 0x26, 0xc7, 0x05, 0xa6, 0xc6, 0x05, 0x06, 0x66, 0x43, 0x10, 0x4c, 0x10, 0x88, 0x61, 0x82, 0x40, 0x10, 0x1b, 0x84, 0x81, 0x98, 0x20, 0x10, 0xc5, 0x06, 0x61, 0x30, 0x28, 0xd8,
+        0xcd, 0x4d, 0x10, 0x08, 0x63, 0xc3, 0x80, 0x24, 0xc4, 0x04, 0x41, 0x00, 0x36, 0x00, 0x1b, 0x06, 0x82, 0x61, 0x36, 0x04, 0xcd, 0x86, 0x61, 0x58, 0x9c, 0x09, 0xc2, 0x42, 0x6d, 0x08, 0x20, 0x12,
+        0x6d, 0x61, 0x69, 0x6e, 0x44, 0xa0, 0x9e, 0xa6, 0x92, 0xa8, 0x92, 0x9e, 0x9c, 0x26, 0x08, 0x05, 0x33, 0x41, 0x28, 0x9a, 0x0d, 0x01, 0x31, 0x41, 0x28, 0x9c, 0x0d, 0x0b, 0x31, 0x51, 0x95, 0x55,
+        0x0d, 0x17, 0x51, 0x01, 0x6c, 0x86, 0x98, 0x92, 0xa0, 0xbe, 0x88, 0x92, 0xa6, 0xa8, 0x82, 0x9c, 0x86, 0x8a, 0x26, 0x08, 0xc5, 0xb3, 0x61, 0x19, 0x32, 0xaa, 0xb2, 0xaa, 0x41, 0x1b, 0x2a, 0x60,
+        0x82, 0x40, 0x1c, 0x1b, 0x82, 0x61, 0xc3, 0xc2, 0x65, 0x54, 0xd5, 0x55, 0x83, 0xc6, 0x55, 0xc0, 0x04, 0x81, 0x40, 0x36, 0x04, 0xdc, 0x86, 0xe5, 0xcb, 0xa8, 0x0a, 0x0c, 0xaa, 0x41, 0xfb, 0x2a,
+        0x60, 0x43, 0xf0, 0x6d, 0x58, 0x8c, 0x8c, 0xaa, 0xc4, 0xa0, 0x1a, 0x34, 0xa3, 0x02, 0x26, 0x08, 0x44, 0xc2, 0x66, 0xa8, 0x8a, 0x89, 0xe9, 0x8b, 0x28, 0x69, 0x8a, 0x2a, 0xc8, 0x69, 0xa8, 0x68,
+        0xc3, 0x42, 0x06, 0x65, 0x40, 0x55, 0x56, 0x35, 0x68, 0x64, 0x50, 0x01, 0x1b, 0x96, 0xa4, 0x0c, 0xa8, 0xaa, 0xab, 0x06, 0x2d, 0xa9, 0x80, 0x09, 0x02, 0xa1, 0x6c, 0x58, 0xd0, 0xa0, 0x0c, 0xa8,
+        0x0a, 0x0c, 0xaa, 0x41, 0x43, 0x83, 0x0a, 0x98, 0x20, 0x10, 0xcb, 0x86, 0x45, 0x0d, 0xca, 0x80, 0xaa, 0xc4, 0xa0, 0x1a, 0x34, 0x35, 0xa8, 0x80, 0x0d, 0x09, 0xb6, 0x79, 0x61, 0x30, 0x06, 0x66,
+        0x70, 0x06, 0x69, 0xb0, 0x06, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0xde, 0xe6, 0xd2, 0xe8, 0xd2, 0xde, 0xdc, 0x26, 0x08, 0x05, 0xb4, 0x61, 0x21, 0xda, 0x80, 0x72, 0x03, 0xeb, 0x1a, 0x2e, 0xa2, 0x02,
+        0xf8, 0x4c, 0x59, 0x7d, 0x0d, 0xb1, 0xa5, 0xc1, 0x11, 0xa5, 0xcd, 0xd1, 0x85, 0xb9, 0x8d, 0x95, 0x4d, 0x10, 0x8a, 0x68, 0x82, 0x50, 0x48, 0x1b, 0x96, 0x01, 0x0e, 0xa8, 0x38, 0xe8, 0xe4, 0x60,
+        0x70, 0x83, 0xa1, 0x02, 0xf8, 0x4c, 0x59, 0x7d, 0x0d, 0xd5, 0xb1, 0xb1, 0x11, 0xa5, 0xcd, 0xd1, 0x85, 0xb9, 0x8d, 0x95, 0x4d, 0x10, 0x8a, 0x69, 0xc3, 0xc2, 0xd1, 0x01, 0x55, 0x07, 0x9d, 0x1c,
+        0x0c, 0x6e, 0xc0, 0x55, 0xc0, 0x86, 0xe5, 0x83, 0x03, 0x2a, 0x0e, 0xc0, 0x40, 0x0e, 0x06, 0x6d, 0x70, 0x03, 0x60, 0xc3, 0x62, 0xd0, 0x01, 0x55, 0x07, 0x60, 0x20, 0x07, 0x83, 0xc6, 0xb9, 0x01,
+        0xb0, 0xa1, 0x78, 0x83, 0x39, 0xb0, 0x83, 0x3b, 0xc0, 0x83, 0x0d, 0x03, 0x1b, 0xe4, 0x01, 0xb0, 0xa1, 0x58, 0x24, 0x3d, 0x00, 0x80, 0x2a, 0x6c, 0x6c, 0x76, 0x6d, 0x2e, 0x69, 0x64, 0x65, 0x6e,
+        0x74, 0x53, 0x82, 0xa0, 0x0a, 0x19, 0x9e, 0x8b, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x80, 0x68, 0x42, 0x86, 0xe7, 0x62, 0x17, 0xc6, 0x66, 0x57, 0x26, 0x37, 0x25, 0x30, 0xea, 0x90,
+        0xe1, 0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95, 0xc9, 0x35, 0xbd, 0x91, 0x95, 0xb1, 0x4d, 0x09, 0x92, 0x4a, 0x64, 0x78, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+        0x6f, 0x6e, 0x73, 0x53, 0x02, 0xa7, 0x0e, 0x19, 0x9e, 0x8b, 0x5d, 0x5a, 0xd9, 0x5d, 0x12, 0xd9, 0x14, 0x5d, 0x18, 0x5d, 0xd9, 0x94, 0x00, 0xaa, 0x43, 0x86, 0xe7, 0x52, 0xe6, 0x46, 0x27, 0x97,
+        0x07, 0xf5, 0x96, 0xe6, 0x46, 0x37, 0x37, 0x25, 0xd0, 0x03, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d,
+        0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d,
+        0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79,
+        0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50,
+        0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03,
+        0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76,
+        0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8,
+        0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43,
+        0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0x03, 0x00, 0x00, 0x71, 0x20, 0x00,
+        0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11,
+        0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00,
+        0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x33, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x54, 0xd1, 0x22, 0x25, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x96, 0xd4, 0x4c, 0x8a,
+        0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x35, 0x49, 0xd4, 0x32, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x81, 0x51, 0x50, 0xc5, 0x10, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x64,
+        0x55, 0x65, 0x35, 0xc5, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x9a, 0x35, 0x5d, 0x8e, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x76, 0x55, 0xd8, 0x73, 0x8c, 0x18, 0x24, 0x00, 0x08,
+        0x82, 0x81, 0xc1, 0x61, 0x5a, 0x06, 0x21, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x74, 0x99, 0xa6, 0x45, 0xc9, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x9e, 0xb6, 0x6d, 0x90, 0x32, 0x62,
+        0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0xb7, 0x71, 0x9c, 0xb3, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x01, 0x06, 0x5c, 0xd7, 0x45, 0xcc, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x60, 0x90,
+        0x79, 0x5e, 0x45, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x02, 0x06, 0x99, 0xe7, 0x4d, 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x60, 0x90, 0x79, 0x1e, 0x24, 0x8c, 0x18, 0x24, 0x00,
+        0x08, 0x82, 0x01, 0x02, 0x06, 0x99, 0xe7, 0x49, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x60, 0x90, 0x7d, 0x5e, 0x55, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x02, 0x06, 0xd9, 0xe7,
+        0x4d, 0xc6, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x60, 0x90, 0x7d, 0x1e, 0x74, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x02, 0x06, 0xd9, 0xe6, 0x55, 0xc9, 0x88, 0x41, 0x02, 0x80, 0x20,
+        0x18, 0x20, 0x60, 0x90, 0x6d, 0xde, 0xa4, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x02, 0x06, 0xd9, 0xe6, 0x41, 0xcb, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x60, 0x90, 0x69, 0x5e, 0x85,
+        0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x02, 0x06, 0x59, 0xe7, 0x55, 0x0c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    };
+    const D3D12_SHADER_BYTECODE vs = {
+        use_dxil ? (const void*)vs_code_dxil : (const void*)vs_code_dxbc,
+        use_dxil ? sizeof(vs_code_dxil) : sizeof(vs_code_dxbc)
+    };
     static const D3D12_INPUT_ELEMENT_DESC layout_desc[] =
     {
         {"POSITION",      0, DXGI_FORMAT_R32G32_FLOAT, 0,  0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0},
@@ -31708,6 +31808,13 @@ static void test_combined_clip_and_cull_distances(void)
     desc.no_pipeline = true;
     if (!init_test_context(&context, &desc))
         return;
+
+    if (use_dxil && !context_supports_dxil(&context))
+    {
+        destroy_test_context(&context);
+        return;
+    }
+
     device = context.device;
     command_list = context.list;
     queue = context.queue;
@@ -31715,8 +31822,16 @@ static void test_combined_clip_and_cull_distances(void)
     input_layout.pInputElementDescs = layout_desc;
     input_layout.NumElements = ARRAY_SIZE(layout_desc);
 
-    context.pipeline_state = create_pipeline_state(device, context.root_signature,
-            context.render_target_desc.Format, &vs, NULL, &input_layout);
+    if (use_dxil)
+    {
+        context.pipeline_state = create_pipeline_state_dxil(device, context.root_signature,
+                context.render_target_desc.Format, &vs, NULL, &input_layout);
+    }
+    else
+    {
+        context.pipeline_state = create_pipeline_state(device, context.root_signature,
+                context.render_target_desc.Format, &vs, NULL, &input_layout);
+    }
 
     vb[0] = create_upload_buffer(device, sizeof(quad), quad);
     vbv[0].BufferLocation = ID3D12Resource_GetGPUVirtualAddress(vb[0]);
@@ -31843,6 +31958,16 @@ static void test_combined_clip_and_cull_distances(void)
     destroy_test_context(&context);
 }
 
+static void test_combined_clip_and_cull_distances_dxbc(void)
+{
+    test_combined_clip_and_cull_distances(false);
+}
+
+static void test_combined_clip_and_cull_distances_dxil(void)
+{
+    test_combined_clip_and_cull_distances(true);
+}
+
 static void test_resource_allocation_info(void)
 {
     D3D12_RESOURCE_ALLOCATION_INFO info;
@@ -37098,7 +37223,8 @@ START_TEST(d3d12)
     run_test(test_cpu_descriptors_lifetime);
     run_test(test_clip_distance_dxbc);
     run_test(test_clip_distance_dxil);
-    run_test(test_combined_clip_and_cull_distances);
+    run_test(test_combined_clip_and_cull_distances_dxbc);
+    run_test(test_combined_clip_and_cull_distances_dxil);
     run_test(test_resource_allocation_info);
     run_test(test_suballocate_small_textures);
     run_test(test_command_list_initial_pipeline_state);
-- 
2.25.0




More information about the wine-devel mailing list