mirror of
https://github.com/RPCS3/glslang.git
synced 2025-02-02 17:16:38 +00:00
Check for packing qualifiers on block members.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24353 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
afda2411c0
commit
3a53006e0e
@ -18,6 +18,9 @@ layout(std140) uniform Transform { // layout of this block is std140
|
|||||||
mat3 N1; // row_major
|
mat3 N1; // row_major
|
||||||
centroid float badf; // ERROR
|
centroid float badf; // ERROR
|
||||||
in float badg; // ERROR
|
in float badg; // ERROR
|
||||||
|
layout(std140) float bad1;
|
||||||
|
layout(shared) float bad2;
|
||||||
|
layout(packed) float bad3;
|
||||||
} tblock;
|
} tblock;
|
||||||
|
|
||||||
uniform T2 { // layout of this block is shared
|
uniform T2 { // layout of this block is shared
|
||||||
@ -47,3 +50,5 @@ void main()
|
|||||||
shared vec4 compute_only; // ERROR
|
shared vec4 compute_only; // ERROR
|
||||||
|
|
||||||
layout(packed) uniform;
|
layout(packed) uniform;
|
||||||
|
|
||||||
|
layout(packed) float aoeuntaoeu;
|
||||||
|
@ -6,54 +6,58 @@ ERROR: 0:12: 'badm4' : cannot specify matrix layout on a variable declaration
|
|||||||
ERROR: 0:12: 'badm4' : cannot specify packing on a variable declaration
|
ERROR: 0:12: 'badm4' : cannot specify packing on a variable declaration
|
||||||
ERROR: 0:19: 'badf' : member of uniform block cannot have an auxiliary or interpolation qualifier
|
ERROR: 0:19: 'badf' : member of uniform block cannot have an auxiliary or interpolation qualifier
|
||||||
ERROR: 0:20: 'badg' : member storage qualifier cannot contradict block storage qualifier
|
ERROR: 0:20: 'badg' : member storage qualifier cannot contradict block storage qualifier
|
||||||
ERROR: 0:28: 'T3' : nameless block contains a member that already has a name at global scope
|
ERROR: 0:21: 'bad1' : member of block cannot have a packing layout qualifier
|
||||||
ERROR: 0:35: 'output block' : not supported with this profile: es
|
ERROR: 0:22: 'bad2' : member of block cannot have a packing layout qualifier
|
||||||
ERROR: 0:39: 'location qualifier on output' : not supported in this stage: vertex
|
ERROR: 0:23: 'bad3' : member of block cannot have a packing layout qualifier
|
||||||
ERROR: 0:47: 'shared' : not supported with this profile: es
|
ERROR: 0:31: 'T3' : nameless block contains a member that already has a name at global scope
|
||||||
ERROR: 0:47: 'shared' : not supported in this stage: vertex
|
ERROR: 0:38: 'output block' : not supported with this profile: es
|
||||||
ERROR: 12 compilation errors. No code generated.
|
ERROR: 0:42: 'location qualifier on output' : not supported in this stage: vertex
|
||||||
|
ERROR: 0:50: 'shared' : not supported with this profile: es
|
||||||
|
ERROR: 0:50: 'shared' : not supported in this stage: vertex
|
||||||
|
ERROR: 0:54: 'aoeuntaoeu' : layout qualifiers for matrix layout and packing only apply to uniform or buffer blocks
|
||||||
|
ERROR: 16 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
ERROR: node is still EOpNull!
|
ERROR: node is still EOpNull!
|
||||||
0:41 Function Definition: main( (void)
|
0:44 Function Definition: main( (void)
|
||||||
0:41 Function Parameters:
|
0:44 Function Parameters:
|
||||||
0:43 Sequence
|
0:46 Sequence
|
||||||
0:43 move second child to first child (highp 4-component vector of float)
|
0:46 move second child to first child (highp 4-component vector of float)
|
||||||
0:43 'pos' (smooth out highp 4-component vector of float)
|
0:46 'pos' (smooth out highp 4-component vector of float)
|
||||||
0:43 vector-times-matrix (highp 4-component vector of float)
|
0:46 vector-times-matrix (highp 4-component vector of float)
|
||||||
0:43 'p' (layout(location=3 ) in highp 4-component vector of float)
|
0:46 'p' (layout(location=3 ) in highp 4-component vector of float)
|
||||||
0:43 add (highp 4X4 matrix of float)
|
0:46 add (highp 4X4 matrix of float)
|
||||||
0:43 add (highp 4X4 matrix of float)
|
0:46 add (highp 4X4 matrix of float)
|
||||||
0:43 add (highp 4X4 matrix of float)
|
0:46 add (highp 4X4 matrix of float)
|
||||||
0:43 add (highp 4X4 matrix of float)
|
0:46 add (highp 4X4 matrix of float)
|
||||||
0:43 M1: direct index for structure (layout(row_major std140 ) highp 4X4 matrix of float)
|
0:46 M1: direct index for structure (layout(row_major std140 ) highp 4X4 matrix of float)
|
||||||
0:43 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg})
|
0:46 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg,bad1,bad2,bad3})
|
||||||
0:43 Constant:
|
0:46 Constant:
|
||||||
0:43 0 (const int)
|
0:46 0 (const int)
|
||||||
0:43 M2: direct index for structure (layout(column_major std140 ) highp 4X4 matrix of float)
|
0:46 M2: direct index for structure (layout(column_major std140 ) highp 4X4 matrix of float)
|
||||||
0:43 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg})
|
0:46 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg,bad1,bad2,bad3})
|
||||||
0:43 Constant:
|
0:46 Constant:
|
||||||
0:43 1 (const int)
|
0:46 1 (const int)
|
||||||
0:43 M4: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float)
|
0:46 M4: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float)
|
||||||
0:43 '__anon__1' (layout(column_major shared ) uniform block{M3,M4,N2,b})
|
0:46 '__anon__1' (layout(column_major shared ) uniform block{M3,M4,N2,b})
|
||||||
0:43 Constant:
|
0:46 Constant:
|
||||||
0:43 1 (const uint)
|
0:46 1 (const uint)
|
||||||
0:43 M3: direct index for structure (layout(column_major shared ) highp 4X4 matrix of float)
|
0:46 M3: direct index for structure (layout(column_major shared ) highp 4X4 matrix of float)
|
||||||
0:43 '__anon__1' (layout(column_major shared ) uniform block{M3,M4,N2,b})
|
0:46 '__anon__1' (layout(column_major shared ) uniform block{M3,M4,N2,b})
|
||||||
0:43 Constant:
|
0:46 Constant:
|
||||||
0:43 0 (const uint)
|
0:46 0 (const uint)
|
||||||
0:43 t2m: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float)
|
0:46 t2m: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float)
|
||||||
0:43 '__anon__0' (layout(row_major shared ) uniform block{b,t2m})
|
0:46 '__anon__0' (layout(row_major shared ) uniform block{b,t2m})
|
||||||
0:43 Constant:
|
0:46 Constant:
|
||||||
0:43 1 (const uint)
|
0:46 1 (const uint)
|
||||||
0:44 move second child to first child (highp 3-component vector of float)
|
0:47 move second child to first child (highp 3-component vector of float)
|
||||||
0:44 'color' (smooth out highp 3-component vector of float)
|
0:47 'color' (smooth out highp 3-component vector of float)
|
||||||
0:44 vector-times-matrix (highp 3-component vector of float)
|
0:47 vector-times-matrix (highp 3-component vector of float)
|
||||||
0:44 'c' (layout(location=7 ) in highp 3-component vector of float)
|
0:47 'c' (layout(location=7 ) in highp 3-component vector of float)
|
||||||
0:44 N1: direct index for structure (layout(row_major std140 ) highp 3X3 matrix of float)
|
0:47 N1: direct index for structure (layout(row_major std140 ) highp 3X3 matrix of float)
|
||||||
0:44 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg})
|
0:47 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg,bad1,bad2,bad3})
|
||||||
0:44 Constant:
|
0:47 Constant:
|
||||||
0:44 2 (const int)
|
0:47 2 (const int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'c' (layout(location=7 ) in highp 3-component vector of float)
|
0:? 'c' (layout(location=7 ) in highp 3-component vector of float)
|
||||||
0:? 'p' (layout(location=3 ) in highp 4-component vector of float)
|
0:? 'p' (layout(location=3 ) in highp 4-component vector of float)
|
||||||
@ -62,11 +66,12 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'pos' (smooth out highp 4-component vector of float)
|
0:? 'pos' (smooth out highp 4-component vector of float)
|
||||||
0:? 'color' (smooth out highp 3-component vector of float)
|
0:? 'color' (smooth out highp 3-component vector of float)
|
||||||
0:? 'badm4' (layout(column_major shared ) uniform highp 4X4 matrix of float)
|
0:? 'badm4' (layout(column_major shared ) uniform highp 4X4 matrix of float)
|
||||||
0:? 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg})
|
0:? 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg,bad1,bad2,bad3})
|
||||||
0:? '__anon__0' (layout(row_major shared ) uniform block{b,t2m})
|
0:? '__anon__0' (layout(row_major shared ) uniform block{b,t2m})
|
||||||
0:? '__anon__2' (out block{f})
|
0:? '__anon__2' (out block{f})
|
||||||
0:? 'badoutA' (layout(location=10 ) smooth out highp 4-component vector of float)
|
0:? 'badoutA' (layout(location=10 ) smooth out highp 4-component vector of float)
|
||||||
0:? 'compute_only' (shared highp 4-component vector of float)
|
0:? 'compute_only' (shared highp 4-component vector of float)
|
||||||
|
0:? 'aoeuntaoeu' (layout(packed ) highp float)
|
||||||
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)
|
||||||
|
|
||||||
|
@ -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 "24347"
|
#define GLSLANG_REVISION "24349"
|
||||||
#define GLSLANG_DATE "2013/12/04 13:08:16"
|
#define GLSLANG_DATE "2013/12/04 13:41:33"
|
||||||
|
@ -3387,6 +3387,8 @@ void TParseContext::declareBlock(TSourceLoc loc, TTypeList& typeList, const TStr
|
|||||||
if (defaultQualification.layoutStream != memberQualifier.layoutStream)
|
if (defaultQualification.layoutStream != memberQualifier.layoutStream)
|
||||||
error(memberLoc, "member cannot contradict block", "stream", "");
|
error(memberLoc, "member cannot contradict block", "stream", "");
|
||||||
}
|
}
|
||||||
|
if (memberQualifier.layoutPacking != ElpNone)
|
||||||
|
error(memberLoc, "member of block cannot have a packing layout qualifier", typeList[member].type->getFieldName().c_str(), "");
|
||||||
TQualifier newMemberQualification = defaultQualification;
|
TQualifier newMemberQualification = defaultQualification;
|
||||||
mergeQualifiers(memberLoc, newMemberQualification, memberQualifier, false);
|
mergeQualifiers(memberLoc, newMemberQualification, memberQualifier, false);
|
||||||
memberQualifier = newMemberQualification;
|
memberQualifier = newMemberQualification;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user