SPIRV-Cross/reference/opt/shaders/asm/comp/undefined-constant-composite.asm.comp
Chip Davis 5547b25afe Interleave undef values with constants and types.
Undef values may be of struct type and may be used in constants.
Therefore, they must be interleaved with constants and types.

Fixes the rest of the Vulkan CTS test
`dEQP-VK.spirv_assembly.instruction.compute.opundef.undefined_spec_constant_composite`.

(Please excuse the churn in the reference output; it's an inevitable
result of this change.)
2022-11-20 02:08:37 -08:00

27 lines
372 B
Plaintext

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
struct _20
{
int _m0;
int _m1;
};
int _28;
layout(binding = 1, std430) buffer _5_6
{
int _m0[10];
} _6;
layout(binding = 0, std430) buffer _7_8
{
int _m0[10];
} _8;
void main()
{
_6._m0[gl_GlobalInvocationID.x] = _8._m0[gl_GlobalInvocationID.x] + _20(_28, 200)._m1;
}