blob: 193f5f43860af34d2f4e95a4134e9cbd96f1a355 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 125
; 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_float_values"
OpName %x_6 "x_6"
OpName %buf1 "buf1"
OpMemberName %buf1 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 %main_1 "main_1"
OpName %arr "arr"
OpName %i "i"
OpName %j "j"
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_float_uint_2 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 1
OpDecorate %tint_symbol_1 Location 0
OpDecorate %_arr_float_uint_5 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf0 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf1 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_9 = OpVariable %_ptr_Uniform_buf1 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%16 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %16
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %16
%void = OpTypeVoid
%19 = OpTypeFunction %void
%uint_5 = OpConstant %uint 5
%_arr_float_uint_5 = OpTypeArray %float %uint_5
%_ptr_Function__arr_float_uint_5 = OpTypePointer Function %_arr_float_uint_5
%27 = OpConstantNull %_arr_float_uint_5
%_ptr_Function_int = OpTypePointer Function %int
%30 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_n1 = OpConstant %int -1
%_ptr_Function_float = OpTypePointer Function %float
%float_1 = OpConstant %float 1
%float_2 = OpConstant %float 2
%main_out = OpTypeStruct %v4float
%113 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %19
%22 = OpLabel
%arr = OpVariable %_ptr_Function__arr_float_uint_5 Function %27
%i = OpVariable %_ptr_Function_int Function %30
%j = OpVariable %_ptr_Function_int Function %30
%35 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%36 = OpLoad %float %35
%37 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%38 = OpLoad %float %37
%39 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%40 = OpLoad %float %39
%41 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%42 = OpLoad %float %41
%43 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%44 = OpLoad %float %43
%45 = OpCompositeConstruct %_arr_float_uint_5 %36 %38 %40 %42 %44
OpStore %arr %45
%48 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%49 = OpLoad %int %48
OpStore %i %49
OpStore %j %int_0
OpBranch %50
%50 = OpLabel
OpLoopMerge %51 %52 None
OpBranch %53
%53 = OpLabel
%54 = OpLoad %int %i
%55 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%56 = OpLoad %int %55
%57 = OpSLessThan %bool %54 %56
OpSelectionMerge %59 None
OpBranchConditional %57 %60 %61
%60 = OpLabel
OpBranch %59
%61 = OpLabel
OpBranch %51
%59 = OpLabel
%62 = OpLoad %int %j
%64 = OpSLessThan %bool %62 %int_n1
OpSelectionMerge %65 None
OpBranchConditional %64 %66 %65
%66 = OpLabel
OpBranch %51
%65 = OpLabel
%67 = OpLoad %int %j
%69 = OpAccessChain %_ptr_Function_float %arr %67
%70 = OpLoad %float %69
%71 = OpAccessChain %_ptr_Function_float %arr %67
%73 = OpFAdd %float %70 %float_1
OpStore %71 %73
OpBranch %52
%52 = OpLabel
%74 = OpLoad %int %i
%75 = OpIAdd %int %74 %int_1
OpStore %i %75
%76 = OpLoad %int %j
%77 = OpIAdd %int %76 %int_1
OpStore %j %77
OpBranch %50
%51 = OpLabel
%78 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%79 = OpLoad %float %78
%80 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%81 = OpLoad %float %80
%82 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%83 = OpLoad %float %82
%84 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%85 = OpLoad %float %84
%86 = OpCompositeConstruct %v4float %79 %81 %83 %85
OpStore %x_GLF_color %86
%87 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%88 = OpLoad %int %87
OpStore %i %88
OpBranch %89
%89 = OpLabel
OpLoopMerge %90 %91 None
OpBranch %92
%92 = OpLabel
%93 = OpLoad %int %i
%94 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%95 = OpLoad %int %94
%96 = OpSLessThan %bool %93 %95
OpSelectionMerge %97 None
OpBranchConditional %96 %98 %99
%98 = OpLabel
OpBranch %97
%99 = OpLabel
OpBranch %90
%97 = OpLabel
%100 = OpLoad %int %i
%101 = OpAccessChain %_ptr_Function_float %arr %100
%102 = OpLoad %float %101
%105 = OpFOrdEqual %bool %102 %float_2
%103 = OpLogicalNot %bool %105
OpSelectionMerge %106 None
OpBranchConditional %103 %107 %106
%107 = OpLabel
%108 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%109 = OpLoad %float %108
%110 = OpCompositeConstruct %v4float %109 %109 %109 %109
OpStore %x_GLF_color %110
OpBranch %106
%106 = OpLabel
OpBranch %91
%91 = OpLabel
%111 = OpLoad %int %i
%112 = OpIAdd %int %111 %int_1
OpStore %i %112
OpBranch %89
%90 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %113
%tint_symbol = OpFunctionParameter %main_out
%117 = OpLabel
%118 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %118
OpReturn
OpFunctionEnd
%main = OpFunction %void None %19
%120 = OpLabel
%121 = OpFunctionCall %void %main_1
%123 = OpLoad %v4float %x_GLF_color
%124 = OpCompositeConstruct %main_out %123
%122 = OpFunctionCall %void %tint_symbol_2 %124
OpReturn
OpFunctionEnd