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
1d258ac3
Unverified
Commit
1d258ac3
authored
Jan 06, 2020
by
John Kessenich
Committed by
GitHub
Jan 06, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2032 from ShchchowAMD/atomic-uint-binding
Modify max binding checks for atomic_uint
parents
40801e31
891ec09c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
450.comp
Test/450.comp
+3
-0
450.comp.out
Test/baseResults/450.comp.out
+7
-6
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+5
-3
No files found.
Test/450.comp
View file @
1d258ac3
#version 450 core
layout(local_size_x = 0) in; // ERROR, 0 not allowed
layout(binding=10000) uniform atomic_uint; // ERROR
void main()
{
shared float f; // ERROR shared must be global
...
...
Test/baseResults/450.comp.out
View file @
1d258ac3
450.comp
ERROR: 0:2: 'local_size_x' : must be at least 1
ERROR: 0:5: 'shared' : not allowed in nested scope
ERROR: 2 compilation errors. No code generated.
ERROR: 0:4: 'binding' : atomic_uint binding is too large
ERROR: 0:8: 'shared' : not allowed in nested scope
ERROR: 3 compilation errors. No code generated.
Shader version: 450
local_size = (1, 1, 1)
ERROR: node is still EOpNull!
0:
3
Function Definition: main( ( global void)
0:
3
Function Parameters:
0:
6
Function Definition: main( ( global void)
0:
6
Function Parameters:
0:? Linker Objects
...
...
@@ -18,7 +19,7 @@ Linked compute stage:
Shader version: 450
local_size = (1, 1, 1)
ERROR: node is still EOpNull!
0:
3
Function Definition: main( ( global void)
0:
3
Function Parameters:
0:
6
Function Definition: main( ( global void)
0:
6
Function Parameters:
0:? Linker Objects
glslang/MachineIndependent/ParseHelper.cpp
View file @
1d258ac3
...
...
@@ -6384,13 +6384,15 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc,
void
TParseContext
::
declareTypeDefaults
(
const
TSourceLoc
&
loc
,
const
TPublicType
&
publicType
)
{
#ifndef GLSLANG_WEB
if
(
publicType
.
basicType
==
EbtAtomicUint
&&
publicType
.
qualifier
.
hasBinding
()
&&
publicType
.
qualifier
.
hasOffset
())
{
if
(
publicType
.
basicType
==
EbtAtomicUint
&&
publicType
.
qualifier
.
hasBinding
())
{
if
(
publicType
.
qualifier
.
layoutBinding
>=
(
unsigned
int
)
resources
.
maxAtomicCounterBindings
)
{
error
(
loc
,
"atomic_uint binding is too large"
,
"binding"
,
""
);
return
;
}
atomicUintOffsets
[
publicType
.
qualifier
.
layoutBinding
]
=
publicType
.
qualifier
.
layoutOffset
;
if
(
publicType
.
qualifier
.
hasOffset
())
{
atomicUintOffsets
[
publicType
.
qualifier
.
layoutBinding
]
=
publicType
.
qualifier
.
layoutOffset
;
}
return
;
}
...
...
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