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
e1ff2312
Commit
e1ff2312
authored
Dec 16, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: Fix #1193: no 'location' on uniform/buffer block.
parent
a0d60f2b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
7 deletions
+25
-7
310implicitSizeArrayError.vert
Test/310implicitSizeArrayError.vert
+1
-1
450.vert
Test/450.vert
+8
-0
310implicitSizeArrayError.vert.out
Test/baseResults/310implicitSizeArrayError.vert.out
+4
-4
330.frag.out
Test/baseResults/330.frag.out
+3
-1
450.vert.out
Test/baseResults/450.vert.out
+7
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+2
-0
No files found.
Test/310implicitSizeArrayError.vert
View file @
e1ff2312
#version 310 es
layout
(
location
=
0
)
uniform
Block
{
layout
(
binding
=
0
)
uniform
Block
{
highp
int
a
[];
}
uni
;
layout
(
location
=
0
)
out
highp
int
o
;
...
...
Test/450.vert
View file @
e1ff2312
...
...
@@ -46,3 +46,11 @@ void foo()
allInvocationsEqual
(
b1
);
// ERROR, need 4.6
}
;
// ERROR: no extraneous semicolons
layout
(
location
=
0
)
uniform
locBlock
{
// ERROR, no location uniform block
int
a
;
};
layout
(
location
=
0
)
buffer
locBuffBlock
{
// ERROR, no location on buffer block
int
b
;
};
Test/baseResults/310implicitSizeArrayError.vert.out
View file @
e1ff2312
...
...
@@ -12,13 +12,13 @@ ERROR: node is still EOpNull!
0:7 'o' (layout( location=0) smooth out highp int)
0:7 direct index (layout( column_major shared) temp highp int)
0:7 a: direct index for structure (layout( column_major shared) uniform implicitly-sized array of highp int)
0:7 'uni' (layout(
location
=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a})
0:7 'uni' (layout(
binding
=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a})
0:7 Constant:
0:7 0 (const int)
0:7 Constant:
0:7 2 (const int)
0:? Linker Objects
0:? 'uni' (layout(
location
=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a})
0:? 'uni' (layout(
binding
=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a})
0:? 'o' (layout( location=0) smooth out highp int)
0:? 'gl_VertexID' ( gl_VertexId highp int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
...
...
@@ -36,13 +36,13 @@ ERROR: node is still EOpNull!
0:7 'o' (layout( location=0) smooth out highp int)
0:7 direct index (layout( column_major shared) temp highp int)
0:7 a: direct index for structure (layout( column_major shared) uniform 1-element array of highp int)
0:7 'uni' (layout(
location
=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a})
0:7 'uni' (layout(
binding
=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a})
0:7 Constant:
0:7 0 (const int)
0:7 Constant:
0:7 2 (const int)
0:? Linker Objects
0:? 'uni' (layout(
location
=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a})
0:? 'uni' (layout(
binding
=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a})
0:? 'o' (layout( location=0) smooth out highp int)
0:? 'gl_VertexID' ( gl_VertexId highp int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
...
...
Test/baseResults/330.frag.out
View file @
e1ff2312
...
...
@@ -16,6 +16,7 @@ ERROR: 0:57: 'location on block member' : not supported for this version or the
ERROR: 0:62: 'location on block member' : can only use in an in/out block
ERROR: 0:62: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 0:60: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 0:60: 'location' : cannot apply to uniform or buffer block
ERROR: 0:68: 'layout-id value' : cannot be negative
ERROR: 0:69: 'layout-id value' : cannot be negative
ERROR: 0:76: 'f2' : cannot use layout qualifiers on structure members
...
...
@@ -23,6 +24,7 @@ ERROR: 0:91: 'location on block member' : can only use in an in/out block
ERROR: 0:91: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 0:91: 'location' : overlapping use of location 3
ERROR: 0:89: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 0:89: 'location' : cannot apply to uniform or buffer block
ERROR: 0:94: 'location' : either the block needs a location, or all members need a location, or no members have a location
ERROR: 0:108: 'A' : cannot use layout qualifiers on structure members
ERROR: 0:119: 'location' : overlapping use of location 44
...
...
@@ -38,7 +40,7 @@ ERROR: 0:140: 'assign' : cannot convert from ' const float' to ' temp 2-compone
ERROR: 0:141: 'textureQueryLod' : no matching overloaded function found
ERROR: 0:141: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float'
ERROR: 0:152: 'index' : value must be 0 or 1
ERROR:
39
compilation errors. No code generated.
ERROR:
41
compilation errors. No code generated.
Shader version: 330
...
...
Test/baseResults/450.vert.out
View file @
e1ff2312
...
...
@@ -19,7 +19,9 @@ ERROR: 0:44: 'anyInvocation' : no matching overloaded function found
ERROR: 0:45: 'allInvocations' : no matching overloaded function found
ERROR: 0:46: 'allInvocationsEqual' : no matching overloaded function found
ERROR: 0:48: 'extraneous semicolon' : not supported for this version or the enabled extensions
ERROR: 20 compilation errors. No code generated.
ERROR: 0:50: 'location' : cannot apply to uniform or buffer block
ERROR: 0:54: 'location' : cannot apply to uniform or buffer block
ERROR: 22 compilation errors. No code generated.
Shader version: 450
...
...
@@ -77,6 +79,8 @@ ERROR: node is still EOpNull!
0:? 'outSS' ( smooth out structure{ global float f, global structure{ global float f} s})
0:? 'aui' (layout( binding=0 offset=0) uniform atomic_uint)
0:? 'ui' ( global uint)
0:? 'anon@1' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform int a})
0:? 'anon@2' (layout( location=0 column_major shared) buffer block{layout( column_major shared) buffer int b})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
...
...
@@ -112,6 +116,8 @@ ERROR: node is still EOpNull!
0:? 'outSS' ( smooth out structure{ global float f, global structure{ global float f} s})
0:? 'aui' (layout( binding=0 offset=0) uniform atomic_uint)
0:? 'ui' ( global uint)
0:? 'anon@1' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform int a})
0:? 'anon@2' (layout( location=0 column_major shared) buffer block{layout( column_major shared) buffer int b})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
glslang/MachineIndependent/ParseHelper.cpp
View file @
e1ff2312
...
...
@@ -4569,6 +4569,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
break
;
case
EvqUniform
:
case
EvqBuffer
:
if
(
type
.
getBasicType
()
==
EbtBlock
)
error
(
loc
,
"cannot apply to uniform or buffer block"
,
"location"
,
""
);
break
;
default
:
error
(
loc
,
"can only apply to uniform, buffer, in, or out storage qualifiers"
,
"location"
,
""
);
...
...
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