blob: 0bb66ca1ecae9ee87fa4d1b55c392c1819a3c7c1 [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 320
OpName %main "main"
OpName %f0 "f0"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "_GLF_uniform_float_values"
OpName %_ ""
OpName %f1 "f1"
OpName %i "i"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "_GLF_uniform_int_values"
OpName %__0 ""
OpName %_GLF_color "_GLF_color"
OpDecorate %_arr_float_uint_3 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
%14 = OpTypeFunction %void
%float = OpTypeFloat 32
%_ptr_Function_float = OpTypePointer Function %float
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%buf0 = OpTypeStruct %_arr_float_uint_3
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Function_int = OpTypePointer Function %int
%_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
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%float_1_10000002 = OpConstant %float 1.10000002
%int_2 = OpConstant %int 2
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %14
%32 = OpLabel
%f0 = OpVariable %_ptr_Function_float Function
%f1 = OpVariable %_ptr_Function_float Function
%i = OpVariable %_ptr_Function_int Function
%33 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%34 = OpLoad %float %33
OpStore %f0 %34
%35 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%36 = OpLoad %float %35
OpStore %f1 %36
%37 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
%38 = OpLoad %int %37
OpStore %i %38
OpBranch %39
%39 = OpLabel
OpLoopMerge %40 %41 None
OpBranch %42
%42 = OpLabel
%43 = OpLoad %int %i
%44 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
%45 = OpLoad %int %44
%46 = OpSLessThan %bool %43 %45
OpBranchConditional %46 %47 %40
%47 = OpLabel
%48 = OpLoad %float %f0
%49 = OpFMul %float %float_1_10000002 %48
%50 = OpExtInst %float %1 FAbs %49
OpStore %f0 %50
%51 = OpLoad %float %f0
OpStore %f1 %51
OpBranch %41
%41 = OpLabel
%52 = OpLoad %int %i
%53 = OpIAdd %int %52 %int_1
OpStore %i %53
OpBranch %39
%40 = OpLabel
%54 = OpLoad %float %f1
%55 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
%56 = OpLoad %float %55
%57 = OpFOrdGreaterThan %bool %54 %56
OpSelectionMerge %58 None
OpBranchConditional %57 %59 %58
%59 = OpLabel
%60 = OpLoad %float %f1
%61 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_2
%62 = OpLoad %float %61
%63 = OpFOrdLessThan %bool %60 %62
OpBranch %58
%58 = OpLabel
%64 = OpPhi %bool %57 %40 %63 %59
OpSelectionMerge %65 None
OpBranchConditional %64 %66 %67
%66 = OpLabel
%68 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
%69 = OpLoad %int %68
%70 = OpConvertSToF %float %69
%71 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
%72 = OpLoad %int %71
%73 = OpConvertSToF %float %72
%74 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
%75 = OpLoad %int %74
%76 = OpConvertSToF %float %75
%77 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
%78 = OpLoad %int %77
%79 = OpConvertSToF %float %78
%80 = OpCompositeConstruct %v4float %70 %73 %76 %79
OpStore %_GLF_color %80
OpBranch %65
%67 = OpLabel
%81 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
%82 = OpLoad %int %81
%83 = OpConvertSToF %float %82
%84 = OpCompositeConstruct %v4float %83 %83 %83 %83
OpStore %_GLF_color %84
OpBranch %65
%65 = OpLabel
OpReturn
OpFunctionEnd