glslang/Test/hlsl.spv.1.6.discard.frag
Greg Fischer 7a49192d23 Add support for spirv1.6
Add command line support which enables the following behavior:

- Remap discard

  Map discard to DemoteToHelperInvocation for HLSL shaders. Map to
  OpTerminateInvocation for GLSL shaders.

- Decorate HelperInvocation with Volatile

- Use localSizeId for execution mode

  WorkGroupSize is deprecated in spirv1.6

Also update known goods to SPIRV 1.6
2021-12-16 15:01:42 -07:00

15 lines
173 B
GLSL

void foo(float f)
{
if (f < 1.0)
discard;
}
void PixelShaderFunction(float4 input) : COLOR0
{
foo(input.z);
if (input.x)
discard;
float f = input.x;
discard;
}