[PATCH 5/5] d3dcompiler: Don't raise a warning for an uninitialized uniform.

Matteo Bruni mbruni at codeweavers.com
Wed Oct 10 11:26:00 CDT 2012


---
 dlls/d3dcompiler_43/hlsl.y |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index afb12ec..a7d4c68 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -605,7 +605,7 @@ static struct list *declare_vars(struct hlsl_type *basic_type, DWORD modifiers,
             local = FALSE;
         }
 
-        if (var->modifiers & HLSL_MODIFIER_CONST && !v->initializer)
+        if (var->modifiers & HLSL_MODIFIER_CONST && !(var->modifiers & HLSL_STORAGE_UNIFORM) && !v->initializer)
         {
             hlsl_report_message(v->loc.file, v->loc.line, v->loc.col,
                     HLSL_LEVEL_ERROR, "const variable without initializer");
-- 
1.7.8.6




More information about the wine-patches mailing list