[PATCH 4/5] d3dcompiler: Don't allow semantics on void functions.

Matteo Bruni mbruni at codeweavers.com
Mon Jul 16 13:39:22 CDT 2012


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

diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index eedf357..33db86b 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -396,6 +396,11 @@ func_prototype:           var_modifiers type var_identifier '(' parameters ')' s
                                             HLSL_LEVEL_ERROR, "redefinition of '%s'\n", $3);
                                     return 1;
                                 }
+                                if ($2->base_type == HLSL_TYPE_VOID && $7)
+                                {
+                                    hlsl_report_message(hlsl_ctx.source_file, @7.first_line, @7.first_column,
+                                            HLSL_LEVEL_ERROR, "void function with a semantic");
+                                }
 
                                 $$ = new_func_decl($3, $2, $5);
                                 if (!$$)
-- 
1.7.8.6




More information about the wine-patches mailing list