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
40007b86
Commit
40007b86
authored
Mar 16, 2020
by
Jeff Bolz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forbid memoryBarrierAtomicCounter for Vulkan compiles
parent
4b2483ee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
4 deletions
+46
-4
spv.atomicCounter.comp.out
Test/baseResults/spv.atomicCounter.comp.out
+15
-0
spv.atomicCounter.comp
Test/spv.atomicCounter.comp
+26
-0
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+4
-4
Spv.FromFile.cpp
gtests/Spv.FromFile.cpp
+1
-0
No files found.
Test/baseResults/spv.atomicCounter.comp.out
0 → 100644
View file @
40007b86
spv.atomicCounter.comp
ERROR: 0:5: 'atomic counter types' : not allowed when using GLSL for Vulkan
ERROR: 0:7: 'atomic counter types' : not allowed when using GLSL for Vulkan
ERROR: 0:14: 'atomic counter types' : not allowed when using GLSL for Vulkan
ERROR: 0:16: 'atomicCounterIncrement' : no matching overloaded function found
ERROR: 0:16: 'return' : type does not match, or is not convertible to, the function's return type
ERROR: 0:21: 'memoryBarrierAtomicCounter' : no matching overloaded function found
ERROR: 0:23: 'atomicCounter' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp highp uint'
ERROR: 0:24: 'atomicCounterDecrement' : no matching overloaded function found
ERROR: 0:25: 'atomicCounterIncrement' : no matching overloaded function found
ERROR: 10 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link
Test/spv.atomicCounter.comp
0 → 100644
View file @
40007b86
#version 450
layout(binding = 0) uniform atomic_uint counter;
layout(binding = 0, offset = 4) uniform atomic_uint countArr[4];
shared uint value;
int arrX[gl_WorkGroupSize.x];
int arrY[gl_WorkGroupSize.y];
int arrZ[gl_WorkGroupSize.z];
uint func(atomic_uint c)
{
return atomicCounterIncrement(c);
}
void main()
{
memoryBarrierAtomicCounter();
func(counter);
uint val = atomicCounter(countArr[2]);
atomicCounterDecrement(counter);
atomicCounterIncrement(counter);
}
glslang/MachineIndependent/Initialize.cpp
View file @
40007b86
...
...
@@ -4067,10 +4067,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
#ifndef GLSLANG_WEB
if
((
profile
!=
EEsProfile
&&
version
>=
420
)
||
esBarrier
)
{
commonBuiltins
.
append
(
"void memoryBarrierAtomicCounter();"
"void memoryBarrierImage();"
);
if
(
spvVersion
.
vulkan
==
0
)
{
commonBuiltins
.
append
(
"void memoryBarrierAtomicCounter();"
);
}
commonBuiltins
.
append
(
"void memoryBarrierImage();"
);
}
if
((
profile
!=
EEsProfile
&&
version
>=
450
)
||
(
profile
==
EEsProfile
&&
version
>=
320
))
{
stageBuiltins
[
EShLangMeshNV
].
append
(
...
...
gtests/Spv.FromFile.cpp
View file @
40007b86
...
...
@@ -271,6 +271,7 @@ INSTANTIATE_TEST_CASE_P(
"spv.always-discard2.frag"
,
"spv.arbPostDepthCoverage.frag"
,
"spv.arbPostDepthCoverage_Error.frag"
,
"spv.atomicCounter.comp"
,
"spv.bitCast.frag"
,
"spv.bool.vert"
,
"spv.boolInBlock.frag"
,
...
...
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