blob: 8a84a5fea55a13c2ed177e4ed2070a431cb6059c [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 92
; 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 %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %count "count"
OpName %i "i"
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_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %tint_symbol_1 Location 0
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_6 = 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
%15 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%int_n93448 = OpConstant %int -93448
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%80 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%count = OpVariable %_ptr_Function_int Function %21
%i = OpVariable %_ptr_Function_int Function %21
%26 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%27 = OpLoad %int %26
OpStore %count %27
%28 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%29 = OpLoad %int %28
OpStore %i %29
OpBranch %30
%30 = OpLabel
OpLoopMerge %31 %32 None
OpBranch %33
%33 = OpLabel
%34 = OpLoad %int %i
%36 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%37 = OpLoad %int %36
%38 = OpSLessThan %bool %34 %37
OpSelectionMerge %40 None
OpBranchConditional %38 %41 %42
%41 = OpLabel
OpBranch %40
%42 = OpLabel
OpBranch %31
%40 = OpLabel
%43 = OpLoad %int %count
%44 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%45 = OpLoad %int %44
%47 = OpSMod %int %43 %int_n93448
%48 = OpSGreaterThan %bool %47 %45
OpSelectionMerge %49 None
OpBranchConditional %48 %50 %49
%50 = OpLabel
%51 = OpLoad %int %count
%52 = OpIAdd %int %51 %int_1
OpStore %count %52
OpBranch %49
%49 = OpLabel
OpBranch %32
%32 = OpLabel
%53 = OpLoad %int %i
%54 = OpIAdd %int %53 %int_1
OpStore %i %54
OpBranch %30
%31 = OpLabel
%55 = OpLoad %int %count
%56 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%57 = OpLoad %int %56
%58 = OpIEqual %bool %55 %57
OpSelectionMerge %59 None
OpBranchConditional %58 %60 %61
%60 = OpLabel
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%64 = OpLoad %int %63
%65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%66 = OpLoad %int %65
%67 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%68 = OpLoad %int %67
%69 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%70 = OpLoad %int %69
%71 = OpConvertSToF %float %64
%72 = OpConvertSToF %float %66
%73 = OpConvertSToF %float %68
%74 = OpConvertSToF %float %70
%75 = OpCompositeConstruct %v4float %71 %72 %73 %74
OpStore %x_GLF_color %75
OpBranch %59
%61 = OpLabel
%76 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%77 = OpLoad %int %76
%78 = OpConvertSToF %float %77
%79 = OpCompositeConstruct %v4float %78 %78 %78 %78
OpStore %x_GLF_color %79
OpBranch %59
%59 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %80
%tint_symbol = OpFunctionParameter %main_out
%84 = OpLabel
%85 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %85
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%87 = OpLabel
%88 = OpFunctionCall %void %main_1
%90 = OpLoad %v4float %x_GLF_color
%91 = OpCompositeConstruct %main_out %90
%89 = OpFunctionCall %void %tint_symbol_2 %91
OpReturn
OpFunctionEnd