Matteo Bruni : d3dcompiler: Don't allow semantics on local variables.
Module: wine Branch: master Commit: 7293c1c0fe81191c8e837a8cd3f3bd6b7d5a4bfa URL: http://source.winehq.org/git/wine.git/?a=commit;h=7293c1c0fe81191c8e837a8cd3... Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Jul 18 16:25:13 2012 +0200 d3dcompiler: Don't allow semantics on local variables. --- dlls/d3dcompiler_43/hlsl.y | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 5025f0c..836dffd 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -143,6 +143,12 @@ static BOOL declare_variable(struct hlsl_ir_var *decl, BOOL local) hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, "modifier '%s' invalid for local variables", debug_modifiers(invalid)); } + if (decl->semantic) + { + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "semantics are not allowed on local variables"); + return FALSE; + } } else { @@ -685,7 +691,6 @@ variables_def: variable_def list_add_tail($$, &$3->entry); } - /* FIXME: Local variables can't have semantics. */ variable_def: any_identifier array semantic { $$ = d3dcompiler_alloc(sizeof(*$$));
participants (1)
-
Alexandre Julliard