Add geometry-shader stream, invocations, max_vertices, lines, triangles, etc. layout qualifiers, and their default/inheritance behaviors, and some other misc. geometry shader features. (Geometry shaders are not yet done though.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23679 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
284231c9c5
commit
94fdd1117b
24 changed files with 639 additions and 225 deletions
|
|
@ -774,16 +774,18 @@ declaration
|
|||
}
|
||||
| type_qualifier SEMICOLON {
|
||||
parseContext.pipeInOutFix($1.loc, $1.qualifier);
|
||||
parseContext.updateQualifierDefaults($1.loc, $1.qualifier);
|
||||
parseContext.updateStandaloneQualifierDefaults($1.loc, $1);
|
||||
$$ = 0;
|
||||
}
|
||||
| type_qualifier IDENTIFIER SEMICOLON {
|
||||
parseContext.pipeInOutFix($1.loc, $1.qualifier);
|
||||
parseContext.checkNoShaderLayouts($1.loc, $1);
|
||||
parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$2.string);
|
||||
$$ = 0;
|
||||
}
|
||||
| type_qualifier IDENTIFIER identifier_list SEMICOLON {
|
||||
parseContext.pipeInOutFix($1.loc, $1.qualifier);
|
||||
parseContext.checkNoShaderLayouts($1.loc, $1);
|
||||
$3->push_back($2.string);
|
||||
parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$3);
|
||||
$$ = 0;
|
||||
|
|
@ -795,7 +797,8 @@ block_structure
|
|||
--parseContext.structNestingLevel;
|
||||
parseContext.blockName = $2.string;
|
||||
parseContext.pipeInOutFix($1.loc, $1.qualifier);
|
||||
parseContext.currentBlockDefaults = $1.qualifier;
|
||||
parseContext.checkNoShaderLayouts($1.loc, $1);
|
||||
parseContext.currentBlockQualifier = $1.qualifier;
|
||||
$$.loc = $1.loc;
|
||||
$$.typeList = $5;
|
||||
}
|
||||
|
|
@ -915,7 +918,8 @@ parameter_declaration
|
|||
$$ = $2;
|
||||
if ($1.qualifier.precision != EpqNone)
|
||||
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
||||
|
||||
|
||||
parseContext.checkNoShaderLayouts($1.loc, $1);
|
||||
parseContext.parameterSamplerCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
||||
parseContext.paramCheck($1.loc, $1.qualifier.storage, $$.param.type);
|
||||
}
|
||||
|
|
@ -932,7 +936,8 @@ parameter_declaration
|
|||
$$ = $2;
|
||||
if ($1.qualifier.precision != EpqNone)
|
||||
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
||||
|
||||
|
||||
parseContext.checkNoShaderLayouts($1.loc, $1);
|
||||
parseContext.parameterSamplerCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
||||
parseContext.paramCheck($1.loc, $1.qualifier.storage, $$.param.type);
|
||||
}
|
||||
|
|
@ -1033,6 +1038,7 @@ fully_specified_type
|
|||
if ($2.arraySizes && parseContext.arrayQualifierError($2.loc, $1.qualifier))
|
||||
$2.arraySizes = 0;
|
||||
|
||||
parseContext.checkNoShaderLayouts($2.loc, $1);
|
||||
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
||||
parseContext.precisionQualifierCheck($2.loc, $2);
|
||||
|
||||
|
|
@ -1089,7 +1095,8 @@ layout_qualifier_id_list
|
|||
}
|
||||
| layout_qualifier_id_list COMMA layout_qualifier_id {
|
||||
$$ = $1;
|
||||
parseContext.mergeLayoutQualifiers($2.loc, $$.qualifier, $3.qualifier);
|
||||
parseContext.mergeShaderLayoutQualifiers($2.loc, $$, $3);
|
||||
parseContext.mergeObjectLayoutQualifiers($2.loc, $$.qualifier, $3.qualifier);
|
||||
}
|
||||
|
||||
layout_qualifier_id
|
||||
|
|
@ -1127,6 +1134,7 @@ type_qualifier
|
|||
if ($$.basicType == EbtVoid)
|
||||
$$.basicType = $2.basicType;
|
||||
|
||||
parseContext.mergeShaderLayoutQualifiers($$.loc, $$, $2);
|
||||
parseContext.mergeQualifiers($$.loc, $$.qualifier, $2.qualifier, false);
|
||||
}
|
||||
;
|
||||
|
|
@ -2043,6 +2051,7 @@ struct_declaration
|
|||
|
||||
$$ = $3;
|
||||
|
||||
parseContext.checkNoShaderLayouts($1.loc, $1);
|
||||
parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType);
|
||||
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
||||
parseContext.precisionQualifierCheck($2.loc, $2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue