blob: 076cd83cf3391091e3f912d86080a9c402700251 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 81
; 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_color "x_GLF_color"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_5 "x_5"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_8 "x_8"
OpName %main_1 "main_1"
OpName %i "i"
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 %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_5 NonWritable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_2 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 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
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf1 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_5 = OpVariable %_ptr_Uniform_buf1 Uniform
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf0 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%void = OpTypeVoid
%19 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%25 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%_ptr_Uniform_float = OpTypePointer Uniform %float
%main_out = OpTypeStruct %v4float
%70 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %19
%22 = OpLabel
%i = OpVariable %_ptr_Function_int Function %25
%29 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
%30 = OpLoad %int %29
%31 = OpConvertSToF %float %30
%32 = OpCompositeConstruct %v4float %31 %31 %31 %31
OpStore %x_GLF_color %32
%33 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
%34 = OpLoad %int %33
OpStore %i %34
OpBranch %35
%35 = OpLabel
OpLoopMerge %36 %37 None
OpBranch %38
%38 = OpLabel
%39 = OpLoad %int %i
%41 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%42 = OpLoad %int %41
%43 = OpSLessThan %bool %39 %42
OpSelectionMerge %45 None
OpBranchConditional %43 %46 %47
%46 = OpLabel
OpBranch %45
%47 = OpLabel
OpBranch %36
%45 = OpLabel
%49 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%50 = OpLoad %float %49
%51 = OpLoad %int %i
%53 = OpConvertSToF %float %51
%54 = OpFOrdLessThanEqual %bool %50 %53
%52 = OpLogicalNot %bool %54
OpSelectionMerge %55 None
OpBranchConditional %52 %56 %55
%56 = OpLabel
%57 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%58 = OpLoad %float %57
%59 = OpLoad %int %i
%60 = OpLoad %int %i
%61 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%62 = OpLoad %float %61
%63 = OpLoad %v4float %x_GLF_color
%64 = OpConvertSToF %float %59
%65 = OpConvertSToF %float %60
%66 = OpCompositeConstruct %v4float %58 %64 %65 %62
%67 = OpFAdd %v4float %63 %66
OpStore %x_GLF_color %67
OpBranch %55
%55 = OpLabel
OpBranch %37
%37 = OpLabel
%68 = OpLoad %int %i
%69 = OpIAdd %int %68 %int_1
OpStore %i %69
OpBranch %35
%36 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %70
%73 = OpLabel
%74 = OpFunctionCall %void %main_1
%75 = OpLoad %v4float %x_GLF_color
%76 = OpCompositeConstruct %main_out %75
OpReturnValue %76
OpFunctionEnd
%main = OpFunction %void None %19
%78 = OpLabel
%79 = OpFunctionCall %main_out %main_inner
%80 = OpCompositeExtract %v4float %79 0
OpStore %x_GLF_color_1_1 %80
OpReturn
OpFunctionEnd