SPIRV-Cross/reference/shaders/asm/comp/undefined-constant-composite.asm.comp
Chip Davis 06ef3de002 GLSL, MSL: Handle OpUndef as part of a constant composite.
Fixes the CTS test
`dEQP-VK.spirv_assembly.instruction.compute.opundef.undefined_constant_composite`
and helps with another,
`dEQP-VK.spirv_assembly.instruction.compute.opundef.undefined_spec_constant_composite`.
Unfortunately, fixing the latter requires another change.
2022-11-20 02:08:33 -08:00

34 lines
467 B
Plaintext

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