HLSL: Fix #1154: Support PointSize, as an attribute.

This commit is contained in:
John Kessenich 2017-12-06 07:33:36 -07:00
parent b0159f8565
commit cc951f8183
9 changed files with 255 additions and 5 deletions

View file

@ -2302,8 +2302,8 @@ bool HlslGrammar::acceptStructBufferType(TType& type)
// : struct_declaration SEMI_COLON struct_declaration SEMI_COLON ...
//
// struct_declaration
// : fully_specified_type struct_declarator COMMA struct_declarator ...
// | fully_specified_type IDENTIFIER function_parameters post_decls compound_statement // member-function definition
// : attributes fully_specified_type struct_declarator COMMA struct_declarator ...
// | attributes fully_specified_type IDENTIFIER function_parameters post_decls compound_statement // member-function definition
//
// struct_declarator
// : IDENTIFIER post_decls
@ -2322,7 +2322,11 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode*
break;
// struct_declaration
// attributes
TAttributeMap attributes;
acceptAttributes(attributes);
bool declarator_list = false;
// fully_specified_type
@ -2332,6 +2336,8 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode*
return false;
}
parseContext.transferTypeAttributes(attributes, memberType);
// struct_declarator COMMA struct_declarator ...
bool functionDefinitionAccepted = false;
do {