[PATCH 2/6] d3d10/effect: Go through both local and shared variables when looking for shader resources.

Nikolay Sivov nsivov at codeweavers.com
Tue Sep 28 07:23:04 CDT 2021


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/d3d10/effect.c       | 101 ++++++++++++++++-----------
 dlls/d3d10/tests/effect.c | 143 ++++++++++++++++++++++----------------
 2 files changed, 143 insertions(+), 101 deletions(-)

diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 71660eb399e..70a99601eea 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -555,14 +555,66 @@ static struct d3d10_effect_variable * d3d10_effect_get_buffer_by_name(struct d3d
     return NULL;
 }
 
+static struct d3d10_effect_variable * d3d10_effect_get_variable_by_name(const struct d3d10_effect *effect,
+        const char *name)
+{
+    ID3D10EffectVariable *v;
+    unsigned int i;
+
+    for (i = 0; i < effect->local_buffer_count; ++i)
+    {
+        struct d3d10_effect_variable *l = &effect->local_buffers[i];
+        unsigned int j;
+
+        for (j = 0; j < l->type->member_count; ++j)
+        {
+            struct d3d10_effect_variable *v = &l->members[j];
+
+            if (v->name && !strcmp(v->name, name))
+            {
+                TRACE("Returning local buffer member variable %s.\n", debugstr_a(name));
+                return v;
+            }
+        }
+    }
+
+    for (i = 0; i < effect->local_variable_count; ++i)
+    {
+        struct d3d10_effect_variable *v = &effect->local_variables[i];
+
+        if (v->name && !strcmp(v->name, name))
+        {
+            TRACE("Returning local variable %s.\n", debugstr_a(name));
+            return v;
+        }
+    }
+
+    if (effect->pool)
+    {
+        if ((v = (ID3D10EffectVariable *)effect->pool->lpVtbl->GetVariableByName(effect->pool, name))
+                && v->lpVtbl->IsValid(v))
+        {
+            TRACE("Found shared variable %s.\n", debugstr_a(name));
+            return impl_from_ID3D10EffectVariable(v);
+        }
+    }
+
+    return NULL;
+}
+
+static struct d3d10_effect_variable * d3d10_effect_get_shader_resource_variable_by_name(
+        const struct d3d10_effect *effect, const char *name)
+{
+    return d3d10_effect_get_variable_by_name(effect, name);
+}
+
 static HRESULT get_fx10_shader_resources(struct d3d10_effect_variable *v, const void *data, size_t data_size)
 {
     struct d3d10_effect_shader_variable *sv = &v->u.shader;
     struct d3d10_effect_shader_resource *sr;
     D3D10_SHADER_INPUT_BIND_DESC bind_desc;
-    struct d3d10_effect_variable *var;
     D3D10_SHADER_DESC desc;
-    unsigned int i, y;
+    unsigned int i;
 
     sv->reflection->lpVtbl->GetDesc(sv->reflection, &desc);
     sv->resource_count = desc.BoundResources;
@@ -591,16 +643,8 @@ static HRESULT get_fx10_shader_resources(struct d3d10_effect_variable *v, const
 
             case D3D10_SIT_SAMPLER:
             case D3D10_SIT_TEXTURE:
-                for (y = 0; y < v->effect->local_variable_count; ++y)
-                {
-                    var = &v->effect->local_variables[y];
-
-                    if (!strcmp(bind_desc.Name, var->name))
-                    {
-                        sr->variable = var;
-                        break;
-                    }
-                }
+                sr->variable = d3d10_effect_get_shader_resource_variable_by_name(v->effect,
+                        bind_desc.Name);
                 break;
 
             default:
@@ -3393,7 +3437,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
         const char *name)
 {
     struct d3d10_effect *effect = impl_from_ID3D10Effect(iface);
-    unsigned int i;
+    struct d3d10_effect_variable *v;
 
     TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
 
@@ -3403,37 +3447,12 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
         return &null_variable.ID3D10EffectVariable_iface;
     }
 
-    for (i = 0; i < effect->local_buffer_count; ++i)
-    {
-        struct d3d10_effect_variable *l = &effect->local_buffers[i];
-        unsigned int j;
-
-        for (j = 0; j < l->type->member_count; ++j)
-        {
-            struct d3d10_effect_variable *v = &l->members[j];
-
-            if (v->name && !strcmp(v->name, name))
-            {
-                TRACE("Returning variable %p.\n", v);
-                return &v->ID3D10EffectVariable_iface;
-            }
-        }
-    }
-
-    for (i = 0; i < effect->local_variable_count; ++i)
+    if ((v = d3d10_effect_get_variable_by_name(effect, name)))
     {
-        struct d3d10_effect_variable *v = &effect->local_variables[i];
-
-        if (v->name && !strcmp(v->name, name))
-        {
-            TRACE("Returning variable %p.\n", v);
-            return &v->ID3D10EffectVariable_iface;
-        }
+        TRACE("Returning variable %p.\n", v);
+        return &v->ID3D10EffectVariable_iface;
     }
 
-    if (effect->pool)
-        return effect->pool->lpVtbl->GetVariableByName(effect->pool, name);
-
     WARN("Invalid name specified\n");
 
     return &null_variable.ID3D10EffectVariable_iface;
diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c
index a1ec44a0a16..60be8186f8b 100644
--- a/dlls/d3d10/tests/effect.c
+++ b/dlls/d3d10/tests/effect.c
@@ -6237,7 +6237,7 @@ cbuffer s_cb
 };
 
 BlendState s_blendstate;
-Texture s_texture;
+Texture2D s_texture;
 PixelShader ps;
 
 technique10 tech
@@ -6252,24 +6252,25 @@ technique10 tech
 #endif
 static DWORD fx_test_pool[] =
 {
-    0x43425844, 0x465314db, 0xd8433ab8, 0x34f3adc3, 0x03610f3e, 0x00000001, 0x00000240, 0x00000001,
-    0x00000024, 0x30315846, 0x00000214, 0xfeff1001, 0x00000001, 0x00000002, 0x00000003, 0x00000000,
-    0x00000000, 0x00000000, 0x00000001, 0x000000ec, 0x00000000, 0x00000001, 0x00000000, 0x00000001,
+    0x43425844, 0x92a09896, 0xbc72ed33, 0x77194b8a, 0xb1132991, 0x00000001, 0x00000242, 0x00000001,
+    0x00000024, 0x30315846, 0x00000216, 0xfeff1001, 0x00000001, 0x00000002, 0x00000003, 0x00000000,
+    0x00000000, 0x00000000, 0x00000001, 0x000000ee, 0x00000000, 0x00000001, 0x00000000, 0x00000001,
     0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x62635f73,
     0x6f6c6600, 0x09007461, 0x01000000, 0x00000000, 0x04000000, 0x10000000, 0x04000000, 0x09000000,
     0x66000009, 0x4f430031, 0x30524f4c, 0x00326600, 0x4f4c4f43, 0x42003152, 0x646e656c, 0x74617453,
     0x003f0065, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00020000, 0x5f730000,
-    0x6e656c62, 0x61747364, 0x74006574, 0x75747865, 0x73006572, 0x02000000, 0x00000000, 0x00000000,
-    0x00000000, 0x00000000, 0x09000000, 0x73000000, 0x7865745f, 0x65727574, 0x78695000, 0x68536c65,
-    0x72656461, 0x0000a100, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000500,
-    0x00737000, 0x68636574, 0x00305000, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x00000002,
-    0x00000000, 0x00000004, 0x00000010, 0x00000000, 0x00000002, 0xffffffff, 0x00000000, 0x0000002b,
-    0x0000000f, 0x0000002e, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000035, 0x0000000f,
-    0x00000038, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000066, 0x0000004a, 0x00000000,
-    0xffffffff, 0x00000000, 0x00000000, 0x00000097, 0x0000007b, 0x00000000, 0xffffffff, 0x00000000,
-    0x000000c9, 0x000000ad, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x000000cc, 0x00000001,
-    0x00000000, 0x000000d1, 0x00000003, 0x00000000, 0x00000007, 0x00000000, 0x00000002, 0x000000c9,
-    0x00000006, 0x00000000, 0x00000001, 0x000000d4, 0x00000008, 0x00000000, 0x00000001, 0x000000e0,
+    0x6e656c62, 0x61747364, 0x54006574, 0x75747865, 0x44326572, 0x00007300, 0x00000200, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000c00, 0x745f7300, 0x75747865, 0x50006572, 0x6c657869,
+    0x64616853, 0xa3007265, 0x02000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05000000,
+    0x70000000, 0x65740073, 0x50006863, 0x00010030, 0x00020000, 0x00000000, 0x00010000, 0x00020000,
+    0x00000000, 0x00040000, 0x00100000, 0x00000000, 0x00020000, 0xffff0000, 0x0000ffff, 0x002b0000,
+    0x000f0000, 0x002e0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00350000, 0x000f0000,
+    0x00380000, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0x00660000, 0x004a0000, 0x00000000,
+    0xffff0000, 0x0000ffff, 0x00000000, 0x00990000, 0x007d0000, 0x00000000, 0xffff0000, 0x0000ffff,
+    0x00cb0000, 0x00af0000, 0x00000000, 0xffff0000, 0x0000ffff, 0x00000000, 0x00ce0000, 0x00010000,
+    0x00000000, 0x00d30000, 0x00030000, 0x00000000, 0x00070000, 0x00000000, 0x00020000, 0x00cb0000,
+    0x00060000, 0x00000000, 0x00010000, 0x00d60000, 0x00080000, 0x00000000, 0x00010000, 0x00e20000,
+    0x00000000,
 };
 
 /* Compiled as a child with /Gch (D3DCOMPILE_EFFECT_CHILD_EFFECT) */
@@ -6291,7 +6292,7 @@ cbuffer l_cb2
 };
 
 shared BlendState s_blendstate;
-shared Texture s_texture;
+shared Texture2D s_texture;
 shared PixelShader ps;
 
 float4 VS( float4 pos : POSITION ) : SV_POSITION
@@ -6299,6 +6300,13 @@ float4 VS( float4 pos : POSITION ) : SV_POSITION
     return f1.xxxx;
 }
 
+float4 PS( float4 pos : SV_POSITION ) : SV_Target
+{
+    return s_texture.Load(int3(0,0,0));
+}
+
+PixelShader vs = CompileShader(ps_4_0, PS());
+
 technique10 tech_child
 {
     pass P0
@@ -6311,45 +6319,61 @@ technique10 tech_child
 #endif
 static DWORD fx_test_pool_child[] =
 {
-    0x43425844, 0xa46943b7, 0x1a80ed65, 0x3602c2be, 0xfe502f4e, 0x00000001, 0x000004d7, 0x00000001,
-    0x00000024, 0x30315846, 0x000004ab, 0xfeff1001, 0x00000002, 0x00000002, 0x00000000, 0x00000001,
-    0x00000002, 0x00000003, 0x00000001, 0x0000033b, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000000, 0x62635f6c,
+    0x43425844, 0xfbf00688, 0x8af86d85, 0x759a5832, 0x320fdd75, 0x00000001, 0x000006e0, 0x00000001,
+    0x00000024, 0x30315846, 0x000006b4, 0xfeff1001, 0x00000002, 0x00000002, 0x00000001, 0x00000001,
+    0x00000002, 0x00000003, 0x00000001, 0x0000052c, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000000, 0x62635f6c,
     0x6f6c6600, 0x09007461, 0x01000000, 0x00000000, 0x04000000, 0x10000000, 0x04000000, 0x09000000,
-    0x66000009, 0x4f430030, 0x30524f4c, 0x635f6c00, 0x66003262, 0x5f730033, 0x66006263, 0x32660031,
-    0x4c4f4300, 0x0031524f, 0x6e656c42, 0x61745364, 0x50006574, 0x02000000, 0x00000000, 0x00000000,
-    0x00000000, 0x00000000, 0x02000000, 0x73000000, 0x656c625f, 0x7473646e, 0x00657461, 0x74786574,
-    0x00657275, 0x00000084, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000009,
-    0x65745f73, 0x72757478, 0x69500065, 0x536c6578, 0x65646168, 0x00b20072, 0x00020000, 0x00000000,
-    0x00000000, 0x00000000, 0x00000000, 0x00050000, 0x73700000, 0x63657400, 0x68635f68, 0x00646c69,
-    0x38003050, 0x44000002, 0x2d434258, 0x4237b3f1, 0x252579b9, 0x2c27ed59, 0x014a8013, 0x38000000,
-    0x05000002, 0x34000000, 0x08000000, 0x3c000001, 0x70000001, 0xbc000001, 0x52000001, 0xcc464544,
-    0x01000000, 0x44000000, 0x01000000, 0x1c000000, 0x00000000, 0x00fffe04, 0xa3000001, 0x3c000000,
-    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01000000, 0x00000000, 0x73000000,
-    0x0062635f, 0x3cababab, 0x02000000, 0x5c000000, 0x10000000, 0x00000000, 0x00000000, 0x8c000000,
-    0x00000000, 0x04000000, 0x02000000, 0x90000000, 0x00000000, 0xa0000000, 0x04000000, 0x04000000,
-    0x00000000, 0x90000000, 0x00000000, 0x66000000, 0x00ab0031, 0x01000300, 0x00000100, 0x00000000,
-    0x66000000, 0x694d0032, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564,
-    0x706d6f43, 0x72656c69, 0x2e303120, 0x49ab0031, 0x2c4e4753, 0x01000000, 0x08000000, 0x20000000,
-    0x00000000, 0x00000000, 0x03000000, 0x00000000, 0x0f000000, 0x50000000, 0x5449534f, 0x004e4f49,
-    0x4fababab, 0x2c4e4753, 0x01000000, 0x08000000, 0x20000000, 0x00000000, 0x01000000, 0x03000000,
-    0x00000000, 0x0f000000, 0x53000000, 0x4f505f56, 0x49544953, 0x53004e4f, 0x44524448, 0x40000000,
-    0x11000100, 0x59000000, 0x46040000, 0x0000208e, 0x01000000, 0x67000000, 0xf2040000, 0x00001020,
-    0x01000000, 0x36000000, 0xf2060000, 0x00001020, 0x06000000, 0x00002080, 0x00000000, 0x3e000000,
-    0x53010000, 0x74544154, 0x02000000, 0x00000000, 0x00000000, 0x01000000, 0x00000000, 0x00000000,
-    0x00000000, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01000000, 0x00000000, 0x00000000,
-    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xeb000000,
-    0x00000000, 0x01000000, 0x02000000, 0x00000000, 0x04000000, 0x10000000, 0x00000000, 0x01000000,
-    0xff000000, 0x00ffffff, 0x2b000000, 0x0f000000, 0x2e000000, 0x00000000, 0x00000000, 0x00000000,
-    0x00000000, 0x35000000, 0x10000000, 0x00000000, 0x01000000, 0xff000000, 0x00ffffff, 0x3b000000,
-    0x0f000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3e000000, 0x10000000,
-    0x00000000, 0x02000000, 0xff000000, 0x43ffffff, 0x0f000000, 0x2e000000, 0x00000000, 0x00000000,
-    0x00000000, 0x46000000, 0x0f000000, 0x49000000, 0x04000000, 0x00000000, 0x00000000, 0x77000000,
-    0x5b000000, 0x00000000, 0xff000000, 0xa8ffffff, 0x8c000000, 0x00000000, 0xff000000, 0xdaffffff,
-    0xbe000000, 0x00000000, 0xff000000, 0xddffffff, 0x01000000, 0x00000000, 0xe8000000, 0x03000000,
-    0x00000000, 0x07000000, 0x00000000, 0x02000000, 0xda000000, 0x06000000, 0x00000000, 0x07000000,
-    0x27000000, 0x08000003, 0x00000000, 0x01000000, 0x2f000000, 0x00000003,
+    0x66000009, 0x4f430030, 0x30524f4c, 0x635f6c00, 0x66003262, 0x69500033, 0x536c6578, 0x65646168,
+    0x003e0072, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00050000, 0x73760000,
+    0x0001e800, 0x42584400, 0x8d083943, 0x1caa8131, 0x88ca8b86, 0xbdb25507, 0x000001d8, 0x0001e800,
+    0x00000500, 0x00003400, 0x0000ac00, 0x0000e000, 0x00011400, 0x00016c00, 0x45445200, 0x00007046,
+    0x00000000, 0x00000000, 0x00000100, 0x00001c00, 0xff040000, 0x000100ff, 0x00004600, 0x00003c00,
+    0x00000200, 0x00000500, 0x00000400, 0xffffff00, 0x000000ff, 0x00000100, 0x00000c00, 0x745f7300,
+    0x75747865, 0x4d006572, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461,
+    0x6d6f4320, 0x656c6970, 0x30312072, 0xab00312e, 0x475349ab, 0x00002c4e, 0x00000100, 0x00000800,
+    0x00002000, 0x00000000, 0x00000100, 0x00000300, 0x00000000, 0x00000f00, 0x5f565300, 0x49534f50,
+    0x4e4f4954, 0x47534f00, 0x00002c4e, 0x00000100, 0x00000800, 0x00002000, 0x00000000, 0x00000000,
+    0x00000300, 0x00000000, 0x00000f00, 0x5f565300, 0x67726154, 0xab007465, 0x444853ab, 0x00005052,
+    0x00004000, 0x00001400, 0x00185800, 0x10700004, 0x00000000, 0x00555500, 0x00006500, 0x1020f203,
+    0x00000000, 0x00002d00, 0x1020f20a, 0x00000000, 0x00400200, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x107e4600, 0x00000000, 0x00003e00, 0x41545301, 0x00007454, 0x00000200, 0x00000000,
+    0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x635f7300, 0x31660062, 0x00326600, 0x4f4c4f43, 0x42003152,
+    0x646e656c, 0x74617453, 0x02670065, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00020000, 0x5f730000, 0x6e656c62, 0x61747364, 0x54006574, 0x75747865, 0x44326572, 0x00029b00,
+    0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000c00, 0x745f7300, 0x75747865,
+    0x70006572, 0x65740073, 0x635f6863, 0x646c6968, 0x00305000, 0x00000238, 0x43425844, 0x37b3f12d,
+    0x2579b942, 0x27ed5925, 0x4a80132c, 0x00000001, 0x00000238, 0x00000005, 0x00000034, 0x00000108,
+    0x0000013c, 0x00000170, 0x000001bc, 0x46454452, 0x000000cc, 0x00000001, 0x00000044, 0x00000001,
+    0x0000001c, 0xfffe0400, 0x00000100, 0x000000a3, 0x0000003c, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x62635f73, 0xababab00, 0x0000003c, 0x00000002,
+    0x0000005c, 0x00000010, 0x00000000, 0x00000000, 0x0000008c, 0x00000000, 0x00000004, 0x00000002,
+    0x00000090, 0x00000000, 0x000000a0, 0x00000004, 0x00000004, 0x00000000, 0x00000090, 0x00000000,
+    0xab003166, 0x00030000, 0x00010001, 0x00000000, 0x00000000, 0x4d003266, 0x6f726369, 0x74666f73,
+    0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x30312072, 0xab00312e,
+    0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
+    0x00000000, 0x0000000f, 0x49534f50, 0x4e4f4954, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001,
+    0x00000008, 0x00000020, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653,
+    0x5449534f, 0x004e4f49, 0x52444853, 0x00000044, 0x00010040, 0x00000011, 0x04000059, 0x00208e46,
+    0x00000000, 0x00000001, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x06000036, 0x001020f2,
+    0x00000000, 0x00208006, 0x00000000, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000002,
+    0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000002dc, 0x00000000, 0x00000001, 0x00000002,
+    0x00000000, 0x00000004, 0x00000010, 0x00000000, 0x00000001, 0xffffffff, 0x00000000, 0x0000002b,
+    0x0000000f, 0x0000002e, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000035, 0x00000010,
+    0x00000000, 0x00000001, 0xffffffff, 0x00000000, 0x0000003b, 0x0000000f, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000066, 0x0000004a, 0x00000000, 0xffffffff, 0x00000069,
+    0x00000000, 0x00000255, 0x00000010, 0x00000000, 0x00000002, 0xffffffff, 0x0000025a, 0x0000000f,
+    0x0000002e, 0x00000000, 0x00000000, 0x00000000, 0x0000025d, 0x0000000f, 0x00000260, 0x00000004,
+    0x00000000, 0x00000000, 0x0000028e, 0x00000272, 0x00000000, 0xffffffff, 0x000002c1, 0x000002a5,
+    0x00000000, 0xffffffff, 0x000002cb, 0x0000004a, 0x00000000, 0xffffffff, 0x000002ce, 0x00000001,
+    0x00000000, 0x000002d9, 0x00000003, 0x00000000, 0x00000007, 0x00000000, 0x00000002, 0x000002cb,
+    0x00000006, 0x00000000, 0x00000007, 0x00000518, 0x00000008, 0x00000000, 0x00000001, 0x00000520,
 };
 
 static void test_effect_pool(void)
@@ -6571,7 +6595,7 @@ todo_wine
     ok(desc.ConstantBuffers == 2, "Unexpected buffer count %u.\n", desc.ConstantBuffers);
     ok(desc.SharedConstantBuffers == 1, "Unexpected shared buffer count %u.\n",
             desc.SharedConstantBuffers);
-    ok(desc.GlobalVariables == 2, "Unexpected variables count %u.\n", desc.GlobalVariables);
+    ok(desc.GlobalVariables == 3, "Unexpected variables count %u.\n", desc.GlobalVariables);
     ok(desc.SharedGlobalVariables == 5, "Unexpected shared variables count %u.\n",
             desc.SharedGlobalVariables);
 
@@ -6627,21 +6651,20 @@ todo_wine
     v = child_effect->lpVtbl->GetVariableByIndex(child_effect, 2);
     hr = v->lpVtbl->GetDesc(v, &var_desc);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
-    ok(!strcmp(var_desc.Name, "f1"), "Unexpected name %s.\n", var_desc.Name);
-todo_wine
-    ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_POOLED, "Unexpected flags %#x.\n", var_desc.Flags);
+    ok(!strcmp(var_desc.Name, "vs"), "Unexpected name %s.\n", var_desc.Name);
+    ok(!var_desc.Flags, "Unexpected flags %#x.\n", var_desc.Flags);
 
     v = child_effect->lpVtbl->GetVariableByIndex(child_effect, 3);
     hr = v->lpVtbl->GetDesc(v, &var_desc);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
-    ok(!strcmp(var_desc.Name, "f2"), "Unexpected name %s.\n", var_desc.Name);
+    ok(!strcmp(var_desc.Name, "f1"), "Unexpected name %s.\n", var_desc.Name);
 todo_wine
     ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_POOLED, "Unexpected flags %#x.\n", var_desc.Flags);
 
     v = child_effect->lpVtbl->GetVariableByIndex(child_effect, 4);
     hr = v->lpVtbl->GetDesc(v, &var_desc);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
-    ok(!strcmp(var_desc.Name, "s_blendstate"), "Unexpected name %s.\n", var_desc.Name);
+    ok(!strcmp(var_desc.Name, "f2"), "Unexpected name %s.\n", var_desc.Name);
 todo_wine
     ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_POOLED, "Unexpected flags %#x.\n", var_desc.Flags);
 
-- 
2.33.0




More information about the wine-devel mailing list