blob: 1e78c0a136611f55d9d7a8f7272f40815ef451c2 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 93
; Schema: 0
OpCapability Shader
%35 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_6 "x_6"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %undefined "undefined"
OpName %x_51 "x_51"
OpName %x_52_phi "x_52_phi"
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 %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 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
%buf1 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%float = OpTypeFloat 32
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf0 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 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_float = OpTypePointer Function %float
%26 = OpConstantNull %float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%30 = OpConstantNull %bool
%float_5 = OpConstant %float 5
%float_0 = OpConstant %float 0
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%main_out = OpTypeStruct %v4float
%81 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%undefined = OpVariable %_ptr_Function_float Function %26
%x_51 = OpVariable %_ptr_Function_bool Function %30
%x_52_phi = OpVariable %_ptr_Function_bool Function %30
%36 = OpFDiv %float %float_5 %float_0
%34 = OpExtInst %float %35 Floor %36
%37 = OpFMul %float %float_0 %34
%38 = OpFSub %float %float_5 %37
OpStore %undefined %38
%42 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%43 = OpLoad %int %42
%44 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%45 = OpLoad %int %44
%47 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%48 = OpLoad %int %47
%49 = OpIAdd %int %45 %48
%50 = OpIEqual %bool %43 %49
OpStore %x_52_phi %50
%51 = OpLogicalNot %bool %50
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %52
%53 = OpLabel
%54 = OpLoad %float %undefined
%56 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%57 = OpLoad %float %56
%58 = OpFOrdGreaterThan %bool %54 %57
OpStore %x_51 %58
%59 = OpLoad %bool %x_51
OpStore %x_52_phi %59
OpBranch %52
%52 = OpLabel
%60 = OpLoad %bool %x_52_phi
OpSelectionMerge %61 None
OpBranchConditional %60 %62 %63
%62 = OpLabel
%64 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%65 = OpLoad %int %64
%66 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%67 = OpLoad %int %66
%68 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%69 = OpLoad %int %68
%70 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%71 = OpLoad %int %70
%72 = OpConvertSToF %float %65
%73 = OpConvertSToF %float %67
%74 = OpConvertSToF %float %69
%75 = OpConvertSToF %float %71
%76 = OpCompositeConstruct %v4float %72 %73 %74 %75
OpStore %x_GLF_color %76
OpBranch %61
%63 = OpLabel
%77 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%78 = OpLoad %int %77
%79 = OpConvertSToF %float %78
%80 = OpCompositeConstruct %v4float %79 %79 %79 %79
OpStore %x_GLF_color %80
OpBranch %61
%61 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %81
%tint_symbol = OpFunctionParameter %main_out
%85 = OpLabel
%86 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %86
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%88 = OpLabel
%89 = OpFunctionCall %void %main_1
%91 = OpLoad %v4float %x_GLF_color
%92 = OpCompositeConstruct %main_out %91
%90 = OpFunctionCall %void %tint_symbol_2 %92
OpReturn
OpFunctionEnd