blob: 72bea4057a57949d46be3dd4c90bf18e94ce8bf3 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 80
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %x_GLF_global_loop_count "x_GLF_global_loop_count"
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_6 "x_6"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%9 = OpConstantNull %int
%x_GLF_global_loop_count = OpVariable %_ptr_Private_int Private %9
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%void = OpTypeVoid
%18 = OpTypeFunction %void
%int_0 = OpConstant %int 0
%int_100 = OpConstant %int 100
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%int_10 = OpConstant %int 10
%int_4 = OpConstant %int 4
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%69 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %18
%21 = OpLabel
OpStore %x_GLF_global_loop_count %int_0
OpBranch %23
%23 = OpLabel
OpLoopMerge %24 %25 None
OpBranch %26
%26 = OpLabel
%27 = OpLoad %int %x_GLF_global_loop_count
%29 = OpSLessThan %bool %27 %int_100
OpSelectionMerge %31 None
OpBranchConditional %29 %32 %33
%32 = OpLabel
OpBranch %31
%33 = OpLabel
OpBranch %24
%31 = OpLabel
%34 = OpLoad %int %x_GLF_global_loop_count
%36 = OpIAdd %int %34 %int_1
OpStore %x_GLF_global_loop_count %36
%37 = OpLoad %int %x_GLF_global_loop_count
%38 = OpLoad %int %x_GLF_global_loop_count
%39 = OpIMul %int %37 %38
%41 = OpSGreaterThan %bool %39 %int_10
OpSelectionMerge %42 None
OpBranchConditional %41 %43 %42
%43 = OpLabel
OpBranch %24
%42 = OpLabel
OpBranch %25
%25 = OpLabel
OpBranch %23
%24 = OpLabel
%44 = OpLoad %int %x_GLF_global_loop_count
%46 = OpIEqual %bool %44 %int_4
OpSelectionMerge %47 None
OpBranchConditional %46 %48 %49
%48 = OpLabel
%52 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%53 = OpLoad %int %52
%54 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%55 = OpLoad %int %54
%56 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%57 = OpLoad %int %56
%58 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%59 = OpLoad %int %58
%60 = OpConvertSToF %float %53
%61 = OpConvertSToF %float %55
%62 = OpConvertSToF %float %57
%63 = OpConvertSToF %float %59
%64 = OpCompositeConstruct %v4float %60 %61 %62 %63
OpStore %x_GLF_color %64
OpBranch %47
%49 = OpLabel
%65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%66 = OpLoad %int %65
%67 = OpConvertSToF %float %66
%68 = OpCompositeConstruct %v4float %67 %67 %67 %67
OpStore %x_GLF_color %68
OpBranch %47
%47 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %69
%72 = OpLabel
%73 = OpFunctionCall %void %main_1
%74 = OpLoad %v4float %x_GLF_color
%75 = OpCompositeConstruct %main_out %74
OpReturnValue %75
OpFunctionEnd
%main = OpFunction %void None %18
%77 = OpLabel
%78 = OpFunctionCall %main_out %main_inner
%79 = OpCompositeExtract %v4float %78 0
OpStore %x_GLF_color_1_1 %79
OpReturn
OpFunctionEnd