blob: 08cec7ec9aa875a4832c1b7131023a9dab9a55c8 [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 310
OpName %main "main"
OpName %f1_ "f1("
OpName %a "a"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "_GLF_uniform_float_values"
OpName %_ ""
OpName %i "i"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "_GLF_uniform_int_values"
OpName %__0 ""
OpName %a_0 "a"
OpName %_GLF_color "_GLF_color"
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %buf1 Block
OpDecorate %__0 DescriptorSet 0
OpDecorate %__0 Binding 1
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%16 = OpTypeFunction %void
%int = OpTypeInt 32 1
%18 = OpTypeFunction %int
%_ptr_Function_int = OpTypePointer Function %int
%int_256 = OpConstant %int 256
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Input_float = OpTypePointer Input %float
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf0 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%buf1 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %16
%37 = OpLabel
%a_0 = OpVariable %_ptr_Function_int Function
%38 = OpFunctionCall %int %f1_
OpStore %a_0 %38
%39 = OpLoad %int %a_0
%40 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
%41 = OpLoad %int %40
%42 = OpIEqual %bool %39 %41
OpSelectionMerge %43 None
OpBranchConditional %42 %44 %45
%44 = OpLabel
%46 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
%47 = OpLoad %int %46
%48 = OpConvertSToF %float %47
%49 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
%50 = OpLoad %int %49
%51 = OpConvertSToF %float %50
%52 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
%53 = OpLoad %int %52
%54 = OpConvertSToF %float %53
%55 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
%56 = OpLoad %int %55
%57 = OpConvertSToF %float %56
%58 = OpCompositeConstruct %v4float %48 %51 %54 %57
OpStore %_GLF_color %58
OpBranch %43
%45 = OpLabel
%59 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
%60 = OpLoad %int %59
%61 = OpConvertSToF %float %60
%62 = OpCompositeConstruct %v4float %61 %61 %61 %61
OpStore %_GLF_color %62
OpBranch %43
%43 = OpLabel
OpReturn
OpFunctionEnd
%f1_ = OpFunction %int None %18
%63 = OpLabel
%a = OpVariable %_ptr_Function_int Function
%i = OpVariable %_ptr_Function_int Function
OpStore %a %int_256
%64 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%65 = OpLoad %float %64
%66 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%67 = OpLoad %float %66
%68 = OpFOrdGreaterThan %bool %65 %67
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %69
%70 = OpLabel
%71 = OpLoad %int %a
%72 = OpIAdd %int %71 %int_1
OpStore %a %72
OpBranch %69
%69 = OpLabel
%73 = OpLoad %int %a
%74 = OpBitCount %int %73
OpStore %i %74
%75 = OpLoad %int %i
%76 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
%77 = OpLoad %int %76
%78 = OpSLessThan %bool %75 %77
OpSelectionMerge %79 None
OpBranchConditional %78 %80 %79
%80 = OpLabel
%81 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
%82 = OpLoad %int %81
OpReturnValue %82
%79 = OpLabel
%83 = OpLoad %int %i
OpReturnValue %83
OpFunctionEnd