SPIRV-Cross/reference/shaders/asm/comp/global-parameter-name-alias.asm.comp
Hans-Kristian Arntzen 87de951105 MSL: Fix naming issue of aliased global variables.
When the name of an alias global variable collides with a global
declaration, MSL would emit inconsistent names, sometimes with the
naming fix, sometimes without, because names were being tracked in two
separate meta blocks. Fix this by always redirecting parameter naming to
the original base variable as necessary.
2018-08-27 09:59:55 +02:00

28 lines
537 B
Plaintext

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 1, std430) readonly buffer ssbo
{
uint _data[];
} ssbo_1;
void Load(uint size)
{
int byteAddrTemp = int(size >> uint(2));
uvec4 data = uvec4(ssbo_1._data[byteAddrTemp], ssbo_1._data[byteAddrTemp + 1], ssbo_1._data[byteAddrTemp + 2], ssbo_1._data[byteAddrTemp + 3]);
}
void _main(uvec3 id)
{
uint param = 4u;
Load(param);
}
void main()
{
uvec3 id = gl_GlobalInvocationID;
uvec3 param = id;
_main(param);
}