SPIRV-Cross/reference/opt/shaders-hlsl/frag/bvec-operations.frag
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

30 lines
619 B
GLSL

static bool _47;
static float2 value;
static float4 FragColor;
struct SPIRV_Cross_Input
{
float2 value : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
};
void frag_main()
{
bool2 _25 = bool2(value.x == 0.0f, _47);
FragColor = float4(1.0f, 0.0f, float(bool2(!_25.x, !_25.y).x), float(bool2(value.x <= float2(1.5f, 0.5f).x, value.y <= float2(1.5f, 0.5f).y).x));
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
value = stage_input.value;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}