SPIRV-Cross/reference/shaders-no-opt/asm/comp/access-tracking-function-call-result.asm.comp
Hans-Kristian Arntzen e2155053c5 Fix broken access tracking for OpFunctionCall results.
We were looking at args[1] after incrementing args array, not before,
which means we tracked garbage.
This is also an out-of-bounds hazard.
2019-10-29 11:13:39 +01:00

25 lines
302 B
Plaintext

#version 460
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 0, std430) buffer Output
{
int myout;
} _5;
int foo()
{
return 12;
}
void main()
{
int _17 = foo();
while (true)
{
_5.myout = _17;
return;
}
_5.myout = _17;
}