blob: 815ee5867d368cdd1b62dae75eee59adfc596204 [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 %a "a"
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_4 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_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buf0 = OpTypeStruct %_arr_int_uint_4
%_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_2 = OpConstant %int 2
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_3 = OpConstant %int 3
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float
%80 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%a = OpVariable %_ptr_Function_int Function %21
%i = OpVariable %_ptr_Function_int Function %21
%26 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%27 = OpLoad %int %26
OpStore %a %27
%29 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%30 = OpLoad %int %29
OpStore %i %30
OpBranch %31
%31 = OpLabel
OpLoopMerge %32 %33 None
OpBranch %34
%34 = OpLabel
%35 = OpLoad %int %i
%37 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%38 = OpLoad %int %37
%39 = OpSLessThan %bool %35 %38
OpSelectionMerge %41 None
OpBranchConditional %39 %42 %43
%42 = OpLabel
OpBranch %41
%43 = OpLabel
OpBranch %32
%41 = OpLabel
%44 = OpLoad %int %i
%45 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%46 = OpLoad %int %45
%48 = OpSMod %int %int_1 %44
%49 = OpIEqual %bool %48 %46
OpSelectionMerge %50 None
OpBranchConditional %49 %51 %50
%51 = OpLabel
OpBranch %33
%50 = OpLabel
%52 = OpLoad %int %a
%53 = OpIAdd %int %52 %int_1
OpStore %a %53
OpBranch %33
%33 = OpLabel
%54 = OpLoad %int %i
%55 = OpIAdd %int %54 %int_1
OpStore %i %55
OpBranch %31
%32 = OpLabel
%56 = OpLoad %int %a
%57 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%58 = OpLoad %int %57
%59 = OpIEqual %bool %56 %58
OpSelectionMerge %60 None
OpBranchConditional %59 %61 %62
%61 = OpLabel
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%64 = OpLoad %int %63
%65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%66 = OpLoad %int %65
%67 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%68 = OpLoad %int %67
%69 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%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 %60
%62 = OpLabel
%76 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%77 = OpLoad %int %76
%78 = OpConvertSToF %float %77
%79 = OpCompositeConstruct %v4float %78 %78 %78 %78
OpStore %x_GLF_color %79
OpBranch %60
%60 = 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