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
c5f2ab96
Commit
c5f2ab96
authored
Jun 08, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: Disallow unsized arrays of atomic_uint.
This tracks Khronos-private specification bug 15945.
parent
885443c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
420.frag.out
Test/baseResults/420.frag.out
+2
-2
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+2
-6
No files found.
Test/baseResults/420.frag.out
View file @
c5f2ab96
...
...
@@ -2,8 +2,8 @@
ERROR: 0:4: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
ERROR: 0:11: 'layout qualifier' : can only apply depth layout to gl_FragDepth
ERROR: 0:12: 'gl_FragDepth' : cannot redeclare after use
WARNING: 0:14: 'atomic_uint' : implicitly sized atomic_uint array treated as having one element for tracking the default offset
ERROR:
3
compilation errors. No code generated.
ERROR: 0:14: 'atomic_uint' : array must be explicitly sized
ERROR:
4
compilation errors. No code generated.
Shader version: 420
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
c5f2ab96
...
...
@@ -4794,12 +4794,8 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
if
(
symbol
.
getType
().
isExplicitlySizedArray
())
numOffsets
*=
symbol
.
getType
().
getCumulativeArraySize
();
else
{
// TODO: functionality: implicitly-sized atomic_uint arrays.
// We don't know the full size until later. This might
// be a specification problem, will report to Khronos. For the
// cases that is not true, the rest of the checking would need
// to be done at link time instead of compile time.
warn
(
loc
,
"implicitly sized atomic_uint array treated as having one element for tracking the default offset"
,
"atomic_uint"
,
""
);
// "It is a compile-time error to declare an unsized array of atomic_uint."
error
(
loc
,
"array must be explicitly sized"
,
"atomic_uint"
,
""
);
}
}
int
repeated
=
intermediate
.
addUsedOffsets
(
qualifier
.
layoutBinding
,
offset
,
numOffsets
);
...
...
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