Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
3a53006e
Commit
3a53006e
authored
Dec 04, 2013
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
parent
afda2411
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
48 deletions
+60
-48
300layout.vert
Test/300layout.vert
+5
-0
300layout.vert.out
Test/baseResults/300layout.vert.out
+51
-46
revision.h
glslang/Include/revision.h
+2
-2
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+2
-0
No files found.
Test/300layout.vert
View file @
3a53006e
...
...
@@ -18,6 +18,9 @@ layout(std140) uniform Transform { // layout of this block is std140
mat3
N1
;
// row_major
centroid
float
badf
;
// ERROR
in
float
badg
;
// ERROR
layout
(
std140
)
float
bad1
;
layout
(
shared
)
float
bad2
;
layout
(
packed
)
float
bad3
;
}
tblock
;
uniform
T2
{
// layout of this block is shared
...
...
@@ -47,3 +50,5 @@ void main()
shared
vec4
compute_only
;
// ERROR
layout
(
packed
)
uniform
;
layout
(
packed
)
float
aoeuntaoeu
;
Test/baseResults/300layout.vert.out
View file @
3a53006e
...
...
@@ -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: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:28: 'T3' : nameless block contains a member that already has a name at global scope
ERROR: 0:35: 'output block' : not supported with this profile: es
ERROR: 0:39: 'location qualifier on output' : not supported in this stage: vertex
ERROR: 0:47: 'shared' : not supported with this profile: es
ERROR: 0:47: 'shared' : not supported in this stage: vertex
ERROR: 12 compilation errors. No code generated.
ERROR: 0:21: 'bad1' : member of block cannot have a packing layout qualifier
ERROR: 0:22: 'bad2' : member of block cannot have a packing layout qualifier
ERROR: 0:23: 'bad3' : member of block cannot have a packing layout qualifier
ERROR: 0:31: 'T3' : nameless block contains a member that already has a name at global scope
ERROR: 0:38: 'output block' : not supported with this profile: es
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!
0:4
1
Function Definition: main( (void)
0:4
1
Function Parameters:
0:4
3
Sequence
0:4
3
move second child to first child (highp 4-component vector of float)
0:4
3
'pos' (smooth out highp 4-component vector of float)
0:4
3
vector-times-matrix (highp 4-component vector of float)
0:4
3
'p' (layout(location=3 ) in highp 4-component vector of float)
0:4
3
add (highp 4X4 matrix of float)
0:4
3
add (highp 4X4 matrix of float)
0:4
3
add (highp 4X4 matrix of float)
0:4
3
add (highp 4X4 matrix of float)
0:4
3
M1: direct index for structure (layout(row_major std140 ) highp 4X4 matrix of float)
0:4
3 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg
})
0:4
3
Constant:
0:4
3
0 (const int)
0:4
3
M2: direct index for structure (layout(column_major std140 ) highp 4X4 matrix of float)
0:4
3 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg
})
0:4
3
Constant:
0:4
3
1 (const int)
0:4
3
M4: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float)
0:4
3
'__anon__1' (layout(column_major shared ) uniform block{M3,M4,N2,b})
0:4
3
Constant:
0:4
3
1 (const uint)
0:4
3
M3: direct index for structure (layout(column_major shared ) highp 4X4 matrix of float)
0:4
3
'__anon__1' (layout(column_major shared ) uniform block{M3,M4,N2,b})
0:4
3
Constant:
0:4
3
0 (const uint)
0:4
3
t2m: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float)
0:4
3
'__anon__0' (layout(row_major shared ) uniform block{b,t2m})
0:4
3
Constant:
0:4
3
1 (const uint)
0:4
4
move second child to first child (highp 3-component vector of float)
0:4
4
'color' (smooth out highp 3-component vector of float)
0:4
4
vector-times-matrix (highp 3-component vector of float)
0:4
4
'c' (layout(location=7 ) in highp 3-component vector of float)
0:4
4
N1: direct index for structure (layout(row_major std140 ) highp 3X3 matrix of float)
0:4
4 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg
})
0:4
4
Constant:
0:4
4
2 (const int)
0:4
4
Function Definition: main( (void)
0:4
4
Function Parameters:
0:4
6
Sequence
0:4
6
move second child to first child (highp 4-component vector of float)
0:4
6
'pos' (smooth out highp 4-component vector of float)
0:4
6
vector-times-matrix (highp 4-component vector of float)
0:4
6
'p' (layout(location=3 ) in highp 4-component vector of float)
0:4
6
add (highp 4X4 matrix of float)
0:4
6
add (highp 4X4 matrix of float)
0:4
6
add (highp 4X4 matrix of float)
0:4
6
add (highp 4X4 matrix of float)
0:4
6
M1: direct index for structure (layout(row_major std140 ) highp 4X4 matrix of float)
0:4
6 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg,bad1,bad2,bad3
})
0:4
6
Constant:
0:4
6
0 (const int)
0:4
6
M2: direct index for structure (layout(column_major std140 ) highp 4X4 matrix of float)
0:4
6 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg,bad1,bad2,bad3
})
0:4
6
Constant:
0:4
6
1 (const int)
0:4
6
M4: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float)
0:4
6
'__anon__1' (layout(column_major shared ) uniform block{M3,M4,N2,b})
0:4
6
Constant:
0:4
6
1 (const uint)
0:4
6
M3: direct index for structure (layout(column_major shared ) highp 4X4 matrix of float)
0:4
6
'__anon__1' (layout(column_major shared ) uniform block{M3,M4,N2,b})
0:4
6
Constant:
0:4
6
0 (const uint)
0:4
6
t2m: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float)
0:4
6
'__anon__0' (layout(row_major shared ) uniform block{b,t2m})
0:4
6
Constant:
0:4
6
1 (const uint)
0:4
7
move second child to first child (highp 3-component vector of float)
0:4
7
'color' (smooth out highp 3-component vector of float)
0:4
7
vector-times-matrix (highp 3-component vector of float)
0:4
7
'c' (layout(location=7 ) in highp 3-component vector of float)
0:4
7
N1: direct index for structure (layout(row_major std140 ) highp 3X3 matrix of float)
0:4
7 'tblock' (layout(row_major std140 ) uniform block{M1,M2,N1,badf,badg,bad1,bad2,bad3
})
0:4
7
Constant:
0:4
7
2 (const int)
0:? Linker Objects
0:? 'c' (layout(location=7 ) in highp 3-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:? 'color' (smooth out highp 3-component vector 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__2' (out block{f})
0:? 'badoutA' (layout(location=10 ) smooth out 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_InstanceID' (gl_InstanceId highp int)
...
...
glslang/Include/revision.h
View file @
3a53006e
...
...
@@ -9,5 +9,5 @@
// 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.
#define GLSLANG_REVISION "2434
7
"
#define GLSLANG_DATE "2013/12/04 13:
08:16
"
#define GLSLANG_REVISION "2434
9
"
#define GLSLANG_DATE "2013/12/04 13:
41:33
"
glslang/MachineIndependent/ParseHelper.cpp
View file @
3a53006e
...
...
@@ -3387,6 +3387,8 @@ void TParseContext::declareBlock(TSourceLoc loc, TTypeList& typeList, const TStr
if
(
defaultQualification
.
layoutStream
!=
memberQualifier
.
layoutStream
)
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
;
mergeQualifiers
(
memberLoc
,
newMemberQualification
,
memberQualifier
,
false
);
memberQualifier
=
newMemberQualification
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment