blob: 40682e798e6d3a1ef005011a3dba24b00a761e72 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 118
; Schema: 0
OpCapability Shader
%74 = OpExtInstImport "GLSL.std.450"
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_10 "x_10"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %M1 "M1"
OpName %a "a"
OpName %c "c"
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_5 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_3 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 1
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_5 = OpConstant %uint 5
%_arr_float_uint_5 = OpTypeArray %float %uint_5
%buf0 = OpTypeStruct %_arr_float_uint_5
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%buf1 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_10 = 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
%v2float = OpTypeVector %float 2
%mat2v2float = OpTypeMatrix %v2float 2
%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
%28 = OpConstantNull %mat2v2float
%_ptr_Function_float = OpTypePointer Function %float
%31 = OpConstantNull %float
%_ptr_Function_int = OpTypePointer Function %int
%34 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%int_4 = OpConstant %int 4
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%main_out = OpTypeStruct %v4float
%106 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%M1 = OpVariable %_ptr_Function_mat2v2float Function %28
%a = OpVariable %_ptr_Function_float Function %31
%c = OpVariable %_ptr_Function_int Function %34
%38 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%39 = OpLoad %float %38
%41 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
%42 = OpLoad %float %41
%44 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_3
%45 = OpLoad %float %44
%47 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_4
%48 = OpLoad %float %47
%49 = OpCompositeConstruct %v2float %39 %42
%50 = OpCompositeConstruct %v2float %45 %48
%51 = OpCompositeConstruct %mat2v2float %49 %50
OpStore %M1 %51
%52 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%53 = OpLoad %float %52
OpStore %a %53
%55 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%56 = OpLoad %int %55
OpStore %c %56
OpBranch %57
%57 = OpLabel
OpLoopMerge %58 %59 None
OpBranch %60
%60 = OpLabel
%61 = OpLoad %int %c
%63 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%64 = OpLoad %int %63
%65 = OpSLessThan %bool %61 %64
OpSelectionMerge %67 None
OpBranchConditional %65 %68 %69
%68 = OpLabel
OpBranch %67
%69 = OpLabel
OpBranch %58
%67 = OpLabel
%70 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%71 = OpLoad %int %70
%72 = OpLoad %int %c
%75 = OpNot %int %72
%73 = OpExtInst %int %74 SClamp %75 %int_0 %int_1
%76 = OpAccessChain %_ptr_Function_float %M1 %71 %73
%77 = OpLoad %float %76
%78 = OpLoad %float %a
%79 = OpFAdd %float %78 %77
OpStore %a %79
OpBranch %59
%59 = OpLabel
%80 = OpLoad %int %c
%81 = OpIAdd %int %80 %int_1
OpStore %c %81
OpBranch %57
%58 = OpLabel
%82 = OpLoad %float %a
%83 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%84 = OpLoad %float %83
%85 = OpFOrdEqual %bool %82 %84
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %88
%87 = OpLabel
%89 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%90 = OpLoad %int %89
%91 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%92 = OpLoad %int %91
%93 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%94 = OpLoad %int %93
%95 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%96 = OpLoad %int %95
%97 = OpConvertSToF %float %90
%98 = OpConvertSToF %float %92
%99 = OpConvertSToF %float %94
%100 = OpConvertSToF %float %96
%101 = OpCompositeConstruct %v4float %97 %98 %99 %100
OpStore %x_GLF_color %101
OpBranch %86
%88 = OpLabel
%102 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%103 = OpLoad %int %102
%104 = OpConvertSToF %float %103
%105 = OpCompositeConstruct %v4float %104 %104 %104 %104
OpStore %x_GLF_color %105
OpBranch %86
%86 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %106
%tint_symbol = OpFunctionParameter %main_out
%110 = OpLabel
%111 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %111
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%113 = OpLabel
%114 = OpFunctionCall %void %main_1
%116 = OpLoad %v4float %x_GLF_color
%117 = OpCompositeConstruct %main_out %116
%115 = OpFunctionCall %void %tint_symbol_2 %117
OpReturn
OpFunctionEnd