lod = textureQueryLod(samp1D, pf); // ERROR, not until 400\r
lod = textureQueryLod(samp2Ds, pf2); // ERROR, not until 400\r
}\r
+\r
+int precise; // okay, not a keyword yet\r
+struct SKeyMem { int precise; } KeyMem; // okay, not a keyword yet\r
+\r
+void fooKeyMem()\r
+{\r
+ KeyMem.precise;\r
+}\r
lod = textureQueryLod(sampBuf, pf); // ERROR\r
lod = textureQueryLod(sampRect, pf2); // ERROR\r
}\r
+\r
+struct SKeyMem { int precise; } KeyMem; // ERROR, keyword can't be a member\r
0:? Sequence\r
0:140 'lod' (temp 2-component vector of float)\r
0:141 'lod' (temp 2-component vector of float)\r
+0:147 Function Definition: fooKeyMem( (global void)\r
+0:147 Function Parameters: \r
+0:149 Sequence\r
+0:149 precise: direct index for structure (global int)\r
+0:149 'KeyMem' (global structure{global int precise})\r
+0:149 Constant:\r
+0:149 0 (const int)\r
0:? Linker Objects\r
0:? 'inVar' (smooth in 4-component vector of float)\r
0:? 'outVar' (layout(location=0 index=0 ) out 4-component vector of float)\r
0:? 'indexBlockI' (layout(location=26 index=0 ) out block{out int a})\r
0:? 'samp1D' (uniform sampler1D)\r
0:? 'samp2Ds' (uniform sampler2DShadow)\r
+0:? 'precise' (global int)\r
+0:? 'KeyMem' (global structure{global int precise})\r
\r
\r
Linked fragment stage:\r
0:? Sequence\r
0:140 'lod' (temp 2-component vector of float)\r
0:141 'lod' (temp 2-component vector of float)\r
+0:147 Function Definition: fooKeyMem( (global void)\r
+0:147 Function Parameters: \r
+0:149 Sequence\r
+0:149 precise: direct index for structure (global int)\r
+0:149 'KeyMem' (global structure{global int precise})\r
+0:149 Constant:\r
+0:149 0 (const int)\r
0:? Linker Objects\r
0:? 'inVar' (smooth in 4-component vector of float)\r
0:? 'outVar' (layout(location=0 index=0 ) out 4-component vector of float)\r
0:? 'indexBlockI' (layout(location=26 index=0 ) out block{out int a})\r
0:? 'samp1D' (uniform sampler1D)\r
0:? 'samp2Ds' (uniform sampler2DShadow)\r
+0:? 'precise' (global int)\r
+0:? 'KeyMem' (global structure{global int precise})\r
\r
ERROR: 0:183: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'\r
ERROR: 0:184: 'textureQueryLod' : no matching overloaded function found \r
ERROR: 0:184: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'\r
-ERROR: 34 compilation errors. No code generated.\r
+ERROR: 0:187: '' : syntax error\r
+ERROR: 35 compilation errors. No code generated.\r
\r
\r
Shader version: 400\r
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
-#define GLSLANG_REVISION "3.0.777"
-#define GLSLANG_DATE "01-Oct-2015"
+#define GLSLANG_REVISION "3.0.778"
+#define GLSLANG_DATE "02-Oct-2015"
case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT;
case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT;
case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT;
- case PpAtomIdentifier: return tokenizeIdentifier();
+ case PpAtomIdentifier:
+ {
+ int token = tokenizeIdentifier();
+ field = false;
+ return token;
+ }
case EndOfInput: return 0;
return identifierOrType();
}
keyword = it->second;
- field = false;
switch (keyword) {
case CONST:
int TScanContext::identifierOrType()
{
parserToken->sType.lex.string = NewPoolTString(tokenText);
- if (field) {
- field = false;
-
- return FIELD_SELECTION;
- }
+ if (field)
+ return IDENTIFIER;
parserToken->sType.lex.symbol = parseContext.symbolTable.find(*parserToken->sType.lex.string);
if (afterType == false && parserToken->sType.lex.symbol) {
%token <lex> IDENTIFIER TYPE_NAME
%token <lex> FLOATCONSTANT DOUBLECONSTANT INTCONSTANT UINTCONSTANT BOOLCONSTANT
-%token <lex> FIELD_SELECTION
%token <lex> LEFT_OP RIGHT_OP
%token <lex> INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP
%token <lex> AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN
| function_call {
$$ = $1;
}
- | postfix_expression DOT FIELD_SELECTION {
+ | postfix_expression DOT IDENTIFIER {
$$ = parseContext.handleDotDereference($3.loc, $1, *$3.string);
}
| postfix_expression INC_OP {