blob: 85eaf66a1080ea6b16b84e9d4266e6799d58787e [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 137
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_9 "x_9"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %S "S"
OpMemberName %S 0 "data"
OpName %func_struct_S_i11_i1_ "func_struct_S_i11_i1_"
OpName %s "s"
OpName %x "x"
OpName %main_1 "main_1"
OpName %i "i"
OpName %arr "arr"
OpName %index "index"
OpName %param "param"
OpName %param_1 "param_1"
OpName %param_2 "param_2"
OpName %param_3 "param_3"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %S 0 Offset 0
OpDecorate %_arr_S_uint_10 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%buf0 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_9 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%12 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
%void = OpTypeVoid
%S = OpTypeStruct %int
%_ptr_Function_S = OpTypePointer Function %S
%_ptr_Function_int = OpTypePointer Function %int
%15 = OpTypeFunction %void %_ptr_Function_S %_ptr_Function_int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%40 = OpTypeFunction %void
%44 = OpConstantNull %int
%uint_10 = OpConstant %uint 10
%_arr_S_uint_10 = OpTypeArray %S %uint_10
%_ptr_Function__arr_S_uint_10 = OpTypePointer Function %_arr_S_uint_10
%49 = OpConstantNull %_arr_S_uint_10
%52 = OpConstantNull %S
%int_10 = OpConstant %int 10
%main_out = OpTypeStruct %v4float
%125 = OpTypeFunction %void %main_out
%func_struct_S_i11_i1_ = OpFunction %void None %15
%s = OpFunctionParameter %_ptr_Function_S
%x = OpFunctionParameter %_ptr_Function_int
%23 = OpLabel
%27 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%28 = OpLoad %int %27
%30 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%31 = OpLoad %int %30
%32 = OpIEqual %bool %28 %31
OpSelectionMerge %34 None
OpBranchConditional %32 %35 %34
%35 = OpLabel
OpReturn
%34 = OpLabel
%37 = OpLoad %int %x
%39 = OpAccessChain %_ptr_Function_int %s %uint_0
OpStore %39 %37
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %40
%42 = OpLabel
%i = OpVariable %_ptr_Function_int Function %44
%arr = OpVariable %_ptr_Function__arr_S_uint_10 Function %49
%index = OpVariable %_ptr_Function_int Function %44
%param = OpVariable %_ptr_Function_S Function %52
%param_1 = OpVariable %_ptr_Function_int Function %44
%param_2 = OpVariable %_ptr_Function_S Function %52
%param_3 = OpVariable %_ptr_Function_int Function %44
OpStore %i %int_0
OpBranch %56
%56 = OpLabel
OpLoopMerge %57 %58 None
OpBranch %59
%59 = OpLabel
%60 = OpLoad %int %i
%62 = OpSLessThan %bool %60 %int_10
OpSelectionMerge %63 None
OpBranchConditional %62 %64 %65
%64 = OpLabel
OpBranch %63
%65 = OpLabel
OpBranch %57
%63 = OpLabel
%66 = OpLoad %int %i
%67 = OpAccessChain %_ptr_Function_int %arr %66 %uint_0
OpStore %67 %int_0
OpBranch %58
%58 = OpLabel
%68 = OpLoad %int %i
%69 = OpIAdd %int %68 %int_1
OpStore %i %69
OpBranch %56
%57 = OpLabel
%70 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%71 = OpLoad %int %70
%72 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%73 = OpLoad %int %72
%74 = OpIEqual %bool %71 %73
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %77
%76 = OpLabel
%78 = OpLoad %int %index
%79 = OpAccessChain %_ptr_Function_S %arr %78
%80 = OpLoad %S %79
OpStore %param %80
%81 = OpLoad %int %index
OpStore %param_1 %81
%82 = OpFunctionCall %void %func_struct_S_i11_i1_ %param %param_1
%85 = OpLoad %S %param
%86 = OpAccessChain %_ptr_Function_S %arr %78
OpStore %86 %85
OpBranch %75
%77 = OpLabel
%87 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%88 = OpLoad %int %87
%89 = OpAccessChain %_ptr_Function_S %arr %88
%90 = OpLoad %S %89
OpStore %param_2 %90
%91 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%92 = OpLoad %int %91
OpStore %param_3 %92
%93 = OpFunctionCall %void %func_struct_S_i11_i1_ %param_2 %param_3
%96 = OpLoad %S %param_2
%97 = OpAccessChain %_ptr_Function_S %arr %88
OpStore %97 %96
OpBranch %75
%75 = OpLabel
%98 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%99 = OpLoad %int %98
%100 = OpAccessChain %_ptr_Function_int %arr %99 %uint_0
%101 = OpLoad %int %100
%102 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%103 = OpLoad %int %102
%104 = OpIEqual %bool %101 %103
OpSelectionMerge %105 None
OpBranchConditional %104 %106 %107
%106 = OpLabel
%108 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%109 = OpLoad %int %108
%110 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%111 = OpLoad %int %110
%112 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%113 = OpLoad %int %112
%114 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%115 = OpLoad %int %114
%116 = OpConvertSToF %float %109
%117 = OpConvertSToF %float %111
%118 = OpConvertSToF %float %113
%119 = OpConvertSToF %float %115
%120 = OpCompositeConstruct %v4float %116 %117 %118 %119
OpStore %x_GLF_color %120
OpBranch %105
%107 = OpLabel
%121 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%122 = OpLoad %int %121
%123 = OpConvertSToF %float %122
%124 = OpCompositeConstruct %v4float %123 %123 %123 %123
OpStore %x_GLF_color %124
OpBranch %105
%105 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %125
%tint_symbol = OpFunctionParameter %main_out
%129 = OpLabel
%130 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %130
OpReturn
OpFunctionEnd
%main = OpFunction %void None %40
%132 = OpLabel
%133 = OpFunctionCall %void %main_1
%135 = OpLoad %v4float %x_GLF_color
%136 = OpCompositeConstruct %main_out %135
%134 = OpFunctionCall %void %tint_symbol_2 %136
OpReturn
OpFunctionEnd