Forbid memoryBarrierAtomicCounter for Vulkan compiles
This commit is contained in:
15
Test/baseResults/spv.atomicCounter.comp.out
Normal file
15
Test/baseResults/spv.atomicCounter.comp.out
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
26
Test/spv.atomicCounter.comp
Normal file
26
Test/spv.atomicCounter.comp
Normal file
@@ -0,0 +1,26 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user