HLSL: Support semantics in function parameter declarations.
This commit is contained in:
parent
21f1286f57
commit
c3387d33ee
@ -1,7 +1,7 @@
|
|||||||
float1 f1 = float1(1.0);
|
float1 f1 = float1(1.0);
|
||||||
float scalar = 2.0;
|
float scalar = 2.0;
|
||||||
|
|
||||||
float1 ShaderFunction(float1 inFloat1, float inScalar) : COLOR0
|
float1 ShaderFunction(float1 inFloat1 : COLOR, float inScalar) : COLOR0
|
||||||
{
|
{
|
||||||
return f1 * scalar + inFloat1 * inScalar;
|
return f1 * scalar + inFloat1 * inScalar;
|
||||||
}
|
}
|
||||||
|
@ -769,8 +769,8 @@ bool HlslGrammar::acceptFunctionParameters(TFunction& function)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// parameter_declaration
|
// parameter_declaration
|
||||||
// : fully_specified_type
|
// : fully_specified_type post_decls
|
||||||
// | fully_specified_type identifier
|
// | fully_specified_type identifier post_decls
|
||||||
//
|
//
|
||||||
bool HlslGrammar::acceptParameterDeclaration(TFunction& function)
|
bool HlslGrammar::acceptParameterDeclaration(TFunction& function)
|
||||||
{
|
{
|
||||||
@ -783,6 +783,8 @@ bool HlslGrammar::acceptParameterDeclaration(TFunction& function)
|
|||||||
HlslToken idToken;
|
HlslToken idToken;
|
||||||
acceptIdentifier(idToken);
|
acceptIdentifier(idToken);
|
||||||
|
|
||||||
|
acceptPostDecls(*type);
|
||||||
|
|
||||||
TParameter param = { idToken.string, type };
|
TParameter param = { idToken.string, type };
|
||||||
function.addParameter(param);
|
function.addParameter(param);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user