Paul Gofman : d3dcompiler: Fill texture fields in D3D11_SHADER_VARIABLE_DESC with default values.

Alexandre Julliard julliard at winehq.org
Wed Sep 9 15:42:27 CDT 2020


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

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Wed Sep  2 23:39:05 2020 +0300

d3dcompiler: Fill texture fields in D3D11_SHADER_VARIABLE_DESC with default values.

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dcompiler_43/reflection.c       |  6 ++++++
 dlls/d3dcompiler_43/tests/reflection.c | 13 +++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 3c4a94f8e5..10558283dd 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -857,6 +857,12 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetDesc(
     desc->uFlags = This->flags;
     desc->DefaultValue = This->default_value;
 
+    /* TODO test and set proper values for texture. */
+    desc->StartTexture = 0xffffffff;
+    desc->TextureSize = 0;
+    desc->StartSampler = 0xffffffff;
+    desc->SamplerSize = 0;
+
     return S_OK;
 }
 
diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c
index c37a9709c2..f856aee43d 100644
--- a/dlls/d3dcompiler_43/tests/reflection.c
+++ b/dlls/d3dcompiler_43/tests/reflection.c
@@ -1783,13 +1783,10 @@ static void test_reflection_constant_buffer(void)
         ok(vdesc.uFlags == pvdesc->uFlags, "Got unexpected uFlags %#x, i %u.\n", vdesc.uFlags, i);
         ok(vdesc.DefaultValue == pvdesc->DefaultValue, "Got unexpected DefaultValue %p, i %u.\n",
                 vdesc.DefaultValue, i);
-        todo_wine_if(D3D_COMPILER_VERSION)
-        {
-            ok(vdesc.StartTexture == 0xffffffff, "Got unexpected StartTexture %#x, i %u.\n", vdesc.StartTexture, i);
-            ok(!vdesc.TextureSize, "Got unexpected TextureSize %u, i %u.\n", vdesc.TextureSize, i);
-            ok(vdesc.StartSampler == 0xffffffff, "Got unexpected StartSampler %u, i %u.\n", vdesc.StartSampler, i);
-            ok(!vdesc.SamplerSize, "Got unexpected SamplerSize %u, i %u.\n", vdesc.SamplerSize, i);
-        }
+        ok(vdesc.StartTexture == 0xffffffff, "Got unexpected StartTexture %#x, i %u.\n", vdesc.StartTexture, i);
+        ok(!vdesc.TextureSize, "Got unexpected TextureSize %u, i %u.\n", vdesc.TextureSize, i);
+        ok(vdesc.StartSampler == 0xffffffff, "Got unexpected StartSampler %u, i %u.\n", vdesc.StartSampler, i);
+        ok(!vdesc.SamplerSize, "Got unexpected SamplerSize %u, i %u.\n", vdesc.SamplerSize, i);
 
         if (ref12)
         {
@@ -1798,7 +1795,7 @@ static void test_reflection_constant_buffer(void)
             hr = v12->lpVtbl->GetDesc(v12, &vdesc12);
             ok(hr == S_OK, "Got unexpected hr %#x, i %u.\n", hr, i);
             ok(!strcmp(vdesc12.Name, pvdesc->Name), "Got unexpected name \"%s\", i %u", vdesc12.Name, i);
-            todo_wine ok(!memcmp(&vdesc12.StartOffset, &vdesc.StartOffset,
+            ok(!memcmp(&vdesc12.StartOffset, &vdesc.StartOffset,
                     sizeof(vdesc) - offsetof(D3D11_SHADER_VARIABLE_DESC, StartOffset)),
                     "D3D11 and D3D12 descs do not match.\n");
         }




More information about the wine-cvs mailing list