Fix missing semantic check: Disallow layout qualifiers when augmenting an already declared variable with a qualifier.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25351 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
782aa830b6
commit
56876dcfe7
Binary file not shown.
@ -159,3 +159,12 @@ int agggf(float f) { return 2; }
|
|||||||
int agggf(float f);
|
int agggf(float f);
|
||||||
|
|
||||||
out struct Ssss { float f; } ssss;
|
out struct Ssss { float f; } ssss;
|
||||||
|
|
||||||
|
uniform Bblock {
|
||||||
|
int a;
|
||||||
|
} Binst;
|
||||||
|
int Bfoo;
|
||||||
|
|
||||||
|
layout(std140) Binst; // ERROR
|
||||||
|
layout(std140) Bblock; // ERROR
|
||||||
|
layout(std140) Bfoo; // ERROR
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
120.vert
|
120.vert
|
||||||
ERROR: 0:3: 'in for stage inputs' : not supported for this version or the enabled extensions
|
ERROR: 0:3: 'in for stage inputs' : not supported for this version or the enabled extensions
|
||||||
ERROR: 0:4: 'out for stage outputs' : not supported for this version or the enabled extensions
|
ERROR: 0:4: 'out for stage outputs' : not supported for this version or the enabled extensions
|
||||||
ERROR: 0:11: 'gl_Position' : cannot add storage, auxiliary, memory, interpolation, or precision qualifier to an existing variable
|
ERROR: 0:11: 'gl_Position' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable
|
||||||
ERROR: 0:12: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
|
ERROR: 0:12: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
|
||||||
ERROR: 0:12: '' : replicated qualifiers
|
ERROR: 0:12: '' : replicated qualifiers
|
||||||
ERROR: 0:12: 'foo' : identifier not previously declared
|
ERROR: 0:12: 'foo' : identifier not previously declared
|
||||||
|
@ -35,7 +35,10 @@ ERROR: 0:146: '' : array size required
|
|||||||
ERROR: 0:147: '' : array size required
|
ERROR: 0:147: '' : array size required
|
||||||
ERROR: 0:148: '' : array size required
|
ERROR: 0:148: '' : array size required
|
||||||
ERROR: 0:149: 'float' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
|
ERROR: 0:149: 'float' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
|
||||||
ERROR: 36 compilation errors. No code generated.
|
ERROR: 0:168: 'Binst' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable
|
||||||
|
ERROR: 0:169: 'Bblock' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable
|
||||||
|
ERROR: 0:170: 'Bfoo' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable
|
||||||
|
ERROR: 39 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
ERROR: node is still EOpNull!
|
ERROR: node is still EOpNull!
|
||||||
@ -286,6 +289,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 's2DAS' (uniform lowp sampler2DArrayShadow)
|
0:? 's2DAS' (uniform lowp sampler2DArrayShadow)
|
||||||
0:? 'c2D' (in highp 2-component vector of float)
|
0:? 'c2D' (in highp 2-component vector of float)
|
||||||
0:? 'ssss' (smooth out structure{highp float f})
|
0:? 'ssss' (smooth out structure{highp float f})
|
||||||
|
0:? 'Binst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp int a})
|
||||||
|
0:? 'Bfoo' (highp int)
|
||||||
0:? 'gl_VertexID' (gl_VertexId highp int)
|
0:? 'gl_VertexID' (gl_VertexId highp int)
|
||||||
0:? 'gl_InstanceID' (gl_InstanceId highp int)
|
0:? 'gl_InstanceID' (gl_InstanceId highp int)
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ ERROR: 0:97: 'binding' : requires block, or sampler/image, or atomic-counter typ
|
|||||||
ERROR: 0:106: '' : vertex input cannot be further qualified
|
ERROR: 0:106: '' : vertex input cannot be further qualified
|
||||||
ERROR: 0:106: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_FrontColor
|
ERROR: 0:106: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_FrontColor
|
||||||
ERROR: 0:112: 'ColorIvn' : identifier not previously declared
|
ERROR: 0:112: 'ColorIvn' : identifier not previously declared
|
||||||
|
WARNING: 0:118: '' : unknown requalification
|
||||||
ERROR: 0:132: 'shared' : not supported in this stage: vertex
|
ERROR: 0:132: 'shared' : not supported in this stage: vertex
|
||||||
ERROR: 0:134: '' : function does not return a value: funcA
|
ERROR: 0:134: '' : function does not return a value: funcA
|
||||||
ERROR: 0:136: '' : function does not return a value: funcB
|
ERROR: 0:136: '' : function does not return a value: funcB
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
// source have to figure out how to create revision.h just to get a build
|
// source have to figure out how to create revision.h just to get a build
|
||||||
// going. However, if it is not updated, it can be a version behind.
|
// going. However, if it is not updated, it can be a version behind.
|
||||||
|
|
||||||
#define GLSLANG_REVISION "25220"
|
#define GLSLANG_REVISION "25314"
|
||||||
#define GLSLANG_DATE "2014/02/03 09:28:23"
|
#define GLSLANG_DATE "2014/02/11 22:15:49"
|
||||||
|
@ -4187,10 +4187,10 @@ void TParseContext::addQualifierToExisting(TSourceLoc loc, TQualifier qualifier,
|
|||||||
if (qualifier.isAuxiliary() ||
|
if (qualifier.isAuxiliary() ||
|
||||||
qualifier.isMemory() ||
|
qualifier.isMemory() ||
|
||||||
qualifier.isInterpolation() ||
|
qualifier.isInterpolation() ||
|
||||||
|
qualifier.hasLayout() ||
|
||||||
qualifier.storage != EvqTemporary ||
|
qualifier.storage != EvqTemporary ||
|
||||||
qualifier.precision != EpqNone) {
|
qualifier.precision != EpqNone) {
|
||||||
error(loc, "cannot add storage, auxiliary, memory, interpolation, or precision qualifier to an existing variable", identifier.c_str(), "");
|
error(loc, "cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable", identifier.c_str(), "");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4204,7 +4204,8 @@ void TParseContext::addQualifierToExisting(TSourceLoc loc, TQualifier qualifier,
|
|||||||
error(loc, "cannot change qualification after use", "invariant", "");
|
error(loc, "cannot change qualification after use", "invariant", "");
|
||||||
symbol->getWritableType().getQualifier().invariant = true;
|
symbol->getWritableType().getQualifier().invariant = true;
|
||||||
invariantCheck(loc, symbol->getType(), identifier);
|
invariantCheck(loc, symbol->getType(), identifier);
|
||||||
}
|
} else
|
||||||
|
warn(loc, "unknown requalification", "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TParseContext::addQualifierToExisting(TSourceLoc loc, TQualifier qualifier, TIdentifierList& identifiers)
|
void TParseContext::addQualifierToExisting(TSourceLoc loc, TQualifier qualifier, TIdentifierList& identifiers)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user