blob: 03ce67168b5341501681066220965aa30a76c9f7 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 141
; 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_6 "x_6"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_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 %a "a"
OpName %v "v"
OpName %m "m"
OpName %indexable "indexable"
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_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_float_uint_4 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 1
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%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
%float = OpTypeFloat 32
%uint_4 = OpConstant %uint 4
%_arr_float_uint_4 = OpTypeArray %float %uint_4
%buf1 = OpTypeStruct %_arr_float_uint_4
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_9 = OpVariable %_ptr_Uniform_buf1 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%17 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %17
%void = OpTypeVoid
%20 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%26 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%mat3v4float = OpTypeMatrix %v4float 3
%_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float
%32 = OpConstantNull %mat3v4float
%mat4v4float = OpTypeMatrix %v4float 4
%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
%36 = OpConstantNull %mat4v4float
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_3 = OpConstant %int 3
%float_0 = OpConstant %float 0
%_ptr_Function_float = OpTypePointer Function %float
%uint_1 = OpConstant %uint 1
%float_1 = OpConstant %float 1
%94 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%main_out = OpTypeStruct %v4float
%129 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%a = OpVariable %_ptr_Function_int Function %26
%v = OpVariable %_ptr_Function_v4float Function %17
%m = OpVariable %_ptr_Function_mat3v4float Function %32
%indexable = OpVariable %_ptr_Function_mat4v4float Function %36
%40 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%41 = OpLoad %int %40
OpStore %a %41
%44 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_2
%45 = OpLoad %float %44
%46 = OpCompositeConstruct %v4float %45 %45 %45 %45
OpStore %v %46
%48 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_3
%49 = OpLoad %float %48
%51 = OpCompositeConstruct %v4float %49 %float_0 %float_0 %float_0
%52 = OpCompositeConstruct %v4float %float_0 %49 %float_0 %float_0
%53 = OpCompositeConstruct %v4float %float_0 %float_0 %49 %float_0
%54 = OpCompositeConstruct %mat3v4float %51 %52 %53
OpStore %m %54
%55 = OpLoad %int %a
%56 = OpLoad %int %a
%57 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_0
%58 = OpLoad %float %57
%60 = OpAccessChain %_ptr_Function_float %m %55 %56
OpStore %60 %58
%61 = OpLoad %int %a
%62 = OpLoad %mat3v4float %m
%63 = OpLoad %int %a
%64 = OpLoad %int %a
%65 = OpCompositeExtract %v4float %62 0
%66 = OpCompositeExtract %float %65 0
%67 = OpCompositeExtract %v4float %62 0
%68 = OpCompositeExtract %float %67 1
%69 = OpCompositeExtract %v4float %62 0
%70 = OpCompositeExtract %float %69 2
%71 = OpCompositeExtract %v4float %62 0
%72 = OpCompositeExtract %float %71 3
%73 = OpCompositeConstruct %v4float %66 %68 %70 %72
%75 = OpCompositeExtract %v4float %62 1
%76 = OpCompositeExtract %float %75 0
%77 = OpCompositeExtract %v4float %62 1
%78 = OpCompositeExtract %float %77 1
%79 = OpCompositeExtract %v4float %62 1
%80 = OpCompositeExtract %float %79 2
%81 = OpCompositeExtract %v4float %62 1
%82 = OpCompositeExtract %float %81 3
%83 = OpCompositeConstruct %v4float %76 %78 %80 %82
%84 = OpCompositeExtract %v4float %62 2
%85 = OpCompositeExtract %float %84 0
%86 = OpCompositeExtract %v4float %62 2
%87 = OpCompositeExtract %float %86 1
%88 = OpCompositeExtract %v4float %62 2
%89 = OpCompositeExtract %float %88 2
%90 = OpCompositeExtract %v4float %62 2
%91 = OpCompositeExtract %float %90 3
%92 = OpCompositeConstruct %v4float %85 %87 %89 %91
%95 = OpCompositeConstruct %mat4v4float %73 %83 %92 %94
OpStore %indexable %95
%96 = OpAccessChain %_ptr_Function_float %indexable %63 %64
%97 = OpLoad %float %96
%98 = OpAccessChain %_ptr_Function_float %v %61
%99 = OpLoad %float %98
%100 = OpAccessChain %_ptr_Function_float %v %61
%101 = OpFAdd %float %99 %97
OpStore %100 %101
%102 = OpAccessChain %_ptr_Function_float %v %uint_1
%103 = OpLoad %float %102
%105 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %int_1
%106 = OpLoad %float %105
%107 = OpFOrdEqual %bool %103 %106
OpSelectionMerge %109 None
OpBranchConditional %107 %110 %111
%110 = OpLabel
%112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%113 = OpLoad %int %112
%114 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%115 = OpLoad %int %114
%116 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%117 = OpLoad %int %116
%118 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%119 = OpLoad %int %118
%120 = OpConvertSToF %float %113
%121 = OpConvertSToF %float %115
%122 = OpConvertSToF %float %117
%123 = OpConvertSToF %float %119
%124 = OpCompositeConstruct %v4float %120 %121 %122 %123
OpStore %x_GLF_color %124
OpBranch %109
%111 = OpLabel
%125 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%126 = OpLoad %int %125
%127 = OpConvertSToF %float %126
%128 = OpCompositeConstruct %v4float %127 %127 %127 %127
OpStore %x_GLF_color %128
OpBranch %109
%109 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %129
%tint_symbol = OpFunctionParameter %main_out
%133 = OpLabel
%134 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %134
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%136 = OpLabel
%137 = OpFunctionCall %void %main_1
%139 = OpLoad %v4float %x_GLF_color
%140 = OpCompositeConstruct %main_out %139
%138 = OpFunctionCall %void %tint_symbol_2 %140
OpReturn
OpFunctionEnd