blob: 90ce459a8a5ffae408aa56c219aa5363a00cb06d [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 92
; Schema: 0
OpCapability Shader
%35 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
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 %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 %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
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
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%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
%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
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%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 %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
%main_inner = OpFunction %main_out None %81
%84 = OpLabel
%85 = OpFunctionCall %void %main_1
%86 = OpLoad %v4float %x_GLF_color
%87 = OpCompositeConstruct %main_out %86
OpReturnValue %87
OpFunctionEnd
%main = OpFunction %void None %20
%89 = OpLabel
%90 = OpFunctionCall %main_out %main_inner
%91 = OpCompositeExtract %v4float %90 0
OpStore %x_GLF_color_1_1 %91
OpReturn
OpFunctionEnd