blob: 373c260e8c2f3e24066a09391076876f409f5aeb [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 84
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_5 "x_5"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "zero"
OpName %x_7 "x_7"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
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_5 NonWritable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 1
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%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_5 = OpVariable %_ptr_Uniform_buf0 Uniform
%buf1 = OpTypeStruct %int
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_7 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
%void = OpTypeVoid
%18 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%false = OpConstantFalse %bool
%main_out = OpTypeStruct %v4float
%72 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %18
%21 = OpLabel
%25 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
%26 = OpLoad %int %25
%28 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%29 = OpLoad %int %28
%30 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%31 = OpLoad %int %30
%32 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
%33 = OpLoad %int %32
%34 = OpConvertSToF %float %26
%35 = OpConvertSToF %float %29
%36 = OpConvertSToF %float %31
%37 = OpConvertSToF %float %33
%38 = OpCompositeConstruct %v4float %34 %35 %36 %37
OpStore %x_GLF_color %38
OpBranch %39
%39 = OpLabel
OpLoopMerge %40 %41 None
OpBranch %42
%42 = OpLabel
%43 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0
%44 = OpLoad %int %43
%45 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
%46 = OpLoad %int %45
%47 = OpIEqual %bool %44 %46
OpSelectionMerge %49 None
OpBranchConditional %47 %50 %49
%50 = OpLabel
OpBranch %41
%49 = OpLabel
%51 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0
%52 = OpLoad %int %51
%54 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
%55 = OpLoad %int %54
%56 = OpIEqual %bool %52 %55
OpSelectionMerge %57 None
OpBranchConditional %56 %58 %57
%58 = OpLabel
OpBranch %40
%57 = OpLabel
%59 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0
%60 = OpLoad %int %59
%62 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_3
%63 = OpLoad %int %62
%64 = OpIEqual %bool %60 %63
OpSelectionMerge %65 None
OpBranchConditional %64 %66 %65
%66 = OpLabel
OpKill
%65 = OpLabel
OpReturn
%41 = OpLabel
OpBranchConditional %false %39 %40
%40 = OpLabel
%68 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%69 = OpLoad %int %68
%70 = OpConvertSToF %float %69
%71 = OpCompositeConstruct %v4float %70 %70 %70 %70
OpStore %x_GLF_color %71
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %72
%tint_symbol = OpFunctionParameter %main_out
%76 = OpLabel
%77 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %77
OpReturn
OpFunctionEnd
%main = OpFunction %void None %18
%79 = OpLabel
%80 = OpFunctionCall %void %main_1
%82 = OpLoad %v4float %x_GLF_color
%83 = OpCompositeConstruct %main_out %82
%81 = OpFunctionCall %void %tint_symbol_2 %83
OpReturn
OpFunctionEnd