Matteo Bruni : d3dcompiler: Initialize MinPrecision when it exists.

Alexandre Julliard julliard at winehq.org
Tue Nov 12 16:56:06 CST 2019


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

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Tue Nov 12 19:47:26 2019 +0100

d3dcompiler: Initialize MinPrecision when it exists.

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

---

 dlls/d3dcompiler_43/reflection.c | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 9a230d8d91..ac24ba0a2d 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -475,17 +475,17 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindin
 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetInputParameterDesc(
         ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
 {
-    struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
+    struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D11ShaderReflection(iface);
 
     TRACE("iface %p, index %u, desc %p\n", iface, index, desc);
 
-    if (!desc || !This->isgn || index >= This->isgn->element_count)
+    if (!desc || !reflection->isgn || index >= reflection->isgn->element_count)
     {
         WARN("Invalid argument specified\n");
         return E_INVALIDARG;
     }
 
-    *desc = This->isgn->elements[index];
+    *desc = reflection->isgn->elements[index];
 
     return S_OK;
 }
@@ -493,17 +493,17 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetInputParameter
 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetOutputParameterDesc(
         ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
 {
-    struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
+    struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D11ShaderReflection(iface);
 
     TRACE("iface %p, index %u, desc %p\n", iface, index, desc);
 
-    if (!desc || !This->osgn || index >= This->osgn->element_count)
+    if (!desc || !reflection->osgn || index >= reflection->osgn->element_count)
     {
         WARN("Invalid argument specified\n");
         return E_INVALIDARG;
     }
 
-    *desc = This->osgn->elements[index];
+    *desc = reflection->osgn->elements[index];
 
     return S_OK;
 }
@@ -511,17 +511,17 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetOutputParamete
 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetPatchConstantParameterDesc(
         ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
 {
-    struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
+    struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D11ShaderReflection(iface);
 
     TRACE("iface %p, index %u, desc %p\n", iface, index, desc);
 
-    if (!desc || !This->pcsg || index >= This->pcsg->element_count)
+    if (!desc || !reflection->pcsg || index >= reflection->pcsg->element_count)
     {
         WARN("Invalid argument specified\n");
         return E_INVALIDARG;
     }
 
-    *desc = This->pcsg->elements[index];
+    *desc = reflection->pcsg->elements[index];
 
     return S_OK;
 }
@@ -1621,6 +1621,10 @@ static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature *
         UINT name_offset;
         DWORD mask;
 
+#if D3D_COMPILER_VERSION >= 46
+        /* FIXME */
+        d[i].MinPrecision = D3D_MIN_PRECISION_DEFAULT;
+#endif
         if (element_size == D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7)
         {
             read_dword(&ptr, &d[i].Stream);




More information about the wine-cvs mailing list