blob: d84314ba71ea2d80195e9c70a388cab2cba1fd3f [file] [log] [blame]
OpCapability Shader
OpExtension "SPV_KHR_terminate_invocation"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %1 "main" %gl_FragCoord %3 %4
OpExecutionMode %1 OriginUpperLeft
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %3 Location 0
OpDecorate %3 Flat
OpDecorate %4 Location 0
OpDecorate %5 DescriptorSet 0
OpDecorate %5 Binding 0
%void = OpTypeVoid
%bool = OpTypeBool
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%int_8 = OpConstant %int 8
%v2int = OpTypeVector %int 2
%v4int = OpTypeVector %int 4
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_int = OpTypePointer Input %int
%_ptr_Output_int = OpTypePointer Output %int
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%3 = OpVariable %_ptr_Input_int Input
%4 = OpVariable %_ptr_Output_int Output
%19 = OpTypeImage %int 2D 0 0 0 2 R32i
%_ptr_UniformConstant_19 = OpTypePointer UniformConstant %19
%5 = OpVariable %_ptr_UniformConstant_19 UniformConstant
%21 = OpTypeFunction %void
%1 = OpFunction %void None %21
%22 = OpLabel
OpStore %4 %int_1
%23 = OpLoad %v4float %gl_FragCoord
%24 = OpCompositeExtract %float %23 0
%25 = OpCompositeExtract %float %23 1
%26 = OpCompositeExtract %float %23 2
%27 = OpConvertFToS %int %24
%28 = OpConvertFToS %int %25
%29 = OpConvertFToS %int %26
%30 = OpBitwiseAnd %int %27 %int_1
%31 = OpBitwiseAnd %int %28 %int_1
%32 = OpIAdd %int %30 %31
%33 = OpLoad %int %3
%34 = OpIAdd %int %32 %33
%35 = OpIEqual %bool %34 %29
OpSelectionMerge %36 None
OpBranchConditional %35 %37 %36
%37 = OpLabel
OpTerminateInvocation
%36 = OpLabel
%38 = OpCompositeConstruct %v4int %27 %int_0 %int_0 %int_0
%39 = OpCompositeConstruct %v2int %27 %28
%40 = OpLoad %19 %5
OpImageWrite %40 %39 %38
OpReturn
OpFunctionEnd