Commit deb00c94 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dcompiler: Allow multiple input/output modifiers.

parent 5e665997
......@@ -991,6 +991,7 @@ static BOOL add_typedef(DWORD modifiers, struct hlsl_type *orig_type, struct lis
%type <list> expr_statement
%type <unary_op> unary_op
%type <assign_op> assign_op
%type <modifiers> input_mods
%type <modifiers> input_mod
%%
......@@ -1225,20 +1226,31 @@ param_list: parameter
}
}
parameter: input_mod var_modifiers type any_identifier semantic
parameter: input_mods var_modifiers type any_identifier semantic
{
$$.modifiers = $1;
$$.modifiers = $1 ? $1 : HLSL_MODIFIER_IN;
$$.modifiers |= $2;
$$.type = $3;
$$.name = $4;
$$.semantic = $5;
}
input_mod: /* Empty */
input_mods: /* Empty */
{
$$ = HLSL_MODIFIER_IN;
$$ = 0;
}
| input_mods input_mod
{
if ($1 & $2)
{
hlsl_report_message(hlsl_ctx.source_file, @2.first_line, @2.first_column,
HLSL_LEVEL_ERROR, "duplicate input-output modifiers");
return 1;
}
$$ = $1 | $2;
}
| KW_IN
input_mod: KW_IN
{
$$ = HLSL_MODIFIER_IN;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment