SPIRV-Cross/reference/shaders-no-opt/asm/frag/array-builtin-bitcast-load-store.asm.frag
Hans-Kristian Arntzen ee31e84e30 GLSL: Handle complex load/store scenarios to gl_SampleMask.
Need special workarounds to handle array load/store since array size is
unsized in GLSL, and array copy is not possible.
Also, consider bitcast for scalar loads and stores.
2021-03-09 10:25:03 +01:00

29 lines
566 B
GLSL

#version 450
layout(binding = 0, std140) uniform uBuffer
{
vec4 color;
} x_12;
layout(location = 0) out vec4 fragColor;
const vec4 _2_init = vec4(0.0);
void main()
{
fragColor = _2_init;
gl_SampleMask[0] = 0;
fragColor = x_12.color;
gl_SampleMask[0] = int(uint(6));
gl_SampleMask[0] = int(uint(gl_SampleMask[0]));
uint _30_unrolled[1];
for (int i = 0; i < int(1); i++)
{
_30_unrolled[i] = int(gl_SampleMask[i]);
}
for (int i = 0; i < int(1); i++)
{
gl_SampleMask[i] = int(_30_unrolled[i]);
}
}