SPIRV-Cross-Vulnerable/reference/shaders/comp/atomic.comp
Hans-Kristian Arntzen 92134e410a Do not add dependencies for variables loaded from UniformConstant.
Fixes case where image variables (OpTypeImage), etc are
loaded from UniformConstant address space.
2016-04-01 19:58:26 +02:00

50 lines
1.8 KiB
Plaintext

#version 310 es
#extension GL_OES_shader_image_atomic : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 2, std430) buffer SSBO
{
uint u32;
int i32;
} ssbo;
layout(binding = 0, r32ui) uniform highp uimage2D uImage;
layout(binding = 1, r32i) uniform highp iimage2D iImage;
void main()
{
uint _19 = imageAtomicAdd(uImage, ivec2(1, 5), 1u);
uint _27 = imageAtomicAdd(uImage, ivec2(1, 5), 1u);
imageStore(iImage, ivec2(1, 6), ivec4(int(_27)));
uint _32 = imageAtomicOr(uImage, ivec2(1, 5), 1u);
uint _34 = imageAtomicXor(uImage, ivec2(1, 5), 1u);
uint _36 = imageAtomicAnd(uImage, ivec2(1, 5), 1u);
uint _38 = imageAtomicMin(uImage, ivec2(1, 5), 1u);
uint _40 = imageAtomicMax(uImage, ivec2(1, 5), 1u);
uint _44 = imageAtomicCompSwap(uImage, ivec2(1, 5), 10u, 2u);
int _47 = imageAtomicAdd(iImage, ivec2(1, 6), 1);
int _49 = imageAtomicOr(iImage, ivec2(1, 6), 1);
int _51 = imageAtomicXor(iImage, ivec2(1, 6), 1);
int _53 = imageAtomicAnd(iImage, ivec2(1, 6), 1);
int _55 = imageAtomicMin(iImage, ivec2(1, 6), 1);
int _57 = imageAtomicMax(iImage, ivec2(1, 6), 1);
int _61 = imageAtomicCompSwap(iImage, ivec2(1, 5), 10, 2);
uint _68 = atomicAdd(ssbo.u32, 1u);
uint _70 = atomicOr(ssbo.u32, 1u);
uint _72 = atomicXor(ssbo.u32, 1u);
uint _74 = atomicAnd(ssbo.u32, 1u);
uint _76 = atomicMin(ssbo.u32, 1u);
uint _78 = atomicMax(ssbo.u32, 1u);
uint _80 = atomicExchange(ssbo.u32, 1u);
uint _82 = atomicCompSwap(ssbo.u32, 10u, 2u);
int _85 = atomicAdd(ssbo.i32, 1);
int _87 = atomicOr(ssbo.i32, 1);
int _89 = atomicXor(ssbo.i32, 1);
int _91 = atomicAnd(ssbo.i32, 1);
int _93 = atomicMin(ssbo.i32, 1);
int _95 = atomicMax(ssbo.i32, 1);
int _97 = atomicExchange(ssbo.i32, 1);
int _99 = atomicCompSwap(ssbo.i32, 10, 2);
}