[PATCH v2 7/7] d3dcompiler: Fill texture fields in D3D11_SHADER_VARIABLE_DESC with default values.
Paul Gofman
pgofman at codeweavers.com
Wed Sep 2 15:39:05 CDT 2020
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
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 3c4a94f8e56..10558283dd4 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 4a914b3251e..531e6bfbc82 100644
--- a/dlls/d3dcompiler_43/tests/reflection.c
+++ b/dlls/d3dcompiler_43/tests/reflection.c
@@ -1866,13 +1866,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)
{
@@ -1881,7 +1878,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");
}
--
2.26.2
More information about the wine-devel
mailing list