Allow future keywords to be accessed as members in a struct.
This fixes a bug where a token that could be a keyword in one version is not a keyword in another version, but treated like a non-member after a "." dereference.
This commit is contained in:
@@ -140,3 +140,11 @@ void qlod()
|
||||
lod = textureQueryLod(samp1D, pf); // ERROR, not until 400
|
||||
lod = textureQueryLod(samp2Ds, pf2); // ERROR, not until 400
|
||||
}
|
||||
|
||||
int precise; // okay, not a keyword yet
|
||||
struct SKeyMem { int precise; } KeyMem; // okay, not a keyword yet
|
||||
|
||||
void fooKeyMem()
|
||||
{
|
||||
KeyMem.precise;
|
||||
}
|
||||
|
||||
@@ -183,3 +183,5 @@ void qlod()
|
||||
lod = textureQueryLod(sampBuf, pf); // ERROR
|
||||
lod = textureQueryLod(sampRect, pf2); // ERROR
|
||||
}
|
||||
|
||||
struct SKeyMem { int precise; } KeyMem; // ERROR, keyword can't be a member
|
||||
|
||||
@@ -79,6 +79,13 @@ ERROR: node is still EOpNull!
|
||||
0:? Sequence
|
||||
0:140 'lod' (temp 2-component vector of float)
|
||||
0:141 'lod' (temp 2-component vector of float)
|
||||
0:147 Function Definition: fooKeyMem( (global void)
|
||||
0:147 Function Parameters:
|
||||
0:149 Sequence
|
||||
0:149 precise: direct index for structure (global int)
|
||||
0:149 'KeyMem' (global structure{global int precise})
|
||||
0:149 Constant:
|
||||
0:149 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'inVar' (smooth in 4-component vector of float)
|
||||
0:? 'outVar' (layout(location=0 index=0 ) out 4-component vector of float)
|
||||
@@ -113,6 +120,8 @@ ERROR: node is still EOpNull!
|
||||
0:? 'indexBlockI' (layout(location=26 index=0 ) out block{out int a})
|
||||
0:? 'samp1D' (uniform sampler1D)
|
||||
0:? 'samp2Ds' (uniform sampler2DShadow)
|
||||
0:? 'precise' (global int)
|
||||
0:? 'KeyMem' (global structure{global int precise})
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -159,6 +168,13 @@ ERROR: node is still EOpNull!
|
||||
0:? Sequence
|
||||
0:140 'lod' (temp 2-component vector of float)
|
||||
0:141 'lod' (temp 2-component vector of float)
|
||||
0:147 Function Definition: fooKeyMem( (global void)
|
||||
0:147 Function Parameters:
|
||||
0:149 Sequence
|
||||
0:149 precise: direct index for structure (global int)
|
||||
0:149 'KeyMem' (global structure{global int precise})
|
||||
0:149 Constant:
|
||||
0:149 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'inVar' (smooth in 4-component vector of float)
|
||||
0:? 'outVar' (layout(location=0 index=0 ) out 4-component vector of float)
|
||||
@@ -193,4 +209,6 @@ ERROR: node is still EOpNull!
|
||||
0:? 'indexBlockI' (layout(location=26 index=0 ) out block{out int a})
|
||||
0:? 'samp1D' (uniform sampler1D)
|
||||
0:? 'samp2Ds' (uniform sampler2DShadow)
|
||||
0:? 'precise' (global int)
|
||||
0:? 'KeyMem' (global structure{global int precise})
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ ERROR: 0:183: 'textureQueryLod' : no matching overloaded function found
|
||||
ERROR: 0:183: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'
|
||||
ERROR: 0:184: 'textureQueryLod' : no matching overloaded function found
|
||||
ERROR: 0:184: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'
|
||||
ERROR: 34 compilation errors. No code generated.
|
||||
ERROR: 0:187: '' : syntax error
|
||||
ERROR: 35 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 400
|
||||
|
||||
Reference in New Issue
Block a user