blob: 8371f6825f71fd9bffbf126f9b5a1377e7975ff4 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 90
; Schema: 0
OpCapability Shader
%40 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_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 %v1 "v1"
OpName %b "b"
OpName %a "a"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_1 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
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%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_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%11 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %11
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %11
%void = OpTypeVoid
%14 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%_ptr_Function_v2float = OpTypePointer Function %v2float
%21 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
%25 = OpConstantNull %float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%29 = OpConstantNull %bool
%uint_0 = OpConstant %uint 0
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1 = OpConstant %float 1
%44 = OpConstantComposite %v2float %float_1 %float_1
%main_out = OpTypeStruct %v4float
%78 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %14
%17 = OpLabel
%v1 = OpVariable %_ptr_Function_v2float Function %21
%b = OpVariable %_ptr_Function_v2float Function %21
%a = OpVariable %_ptr_Function_float Function %25
%x_51 = OpVariable %_ptr_Function_bool Function %29
%x_52_phi = OpVariable %_ptr_Function_bool Function %29
%35 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%36 = OpLoad %float %35
%37 = OpCompositeConstruct %v2float %36 %36
OpStore %v1 %37
%38 = OpLoad %v2float %v1
%39 = OpExtInst %v2float %40 Fract %38
OpStore %b %39
%41 = OpLoad %v2float %b
%42 = OpExtInst %v2float %40 SmoothStep %44 %44 %41
%45 = OpCompositeExtract %float %42 0
OpStore %a %45
%46 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%47 = OpLoad %float %46
%48 = OpLoad %float %a
%49 = OpLoad %float %a
%50 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%51 = OpLoad %float %50
%52 = OpCompositeConstruct %v4float %47 %48 %49 %51
OpStore %x_GLF_color %52
%53 = OpAccessChain %_ptr_Function_float %b %uint_0
%54 = OpLoad %float %53
%55 = OpFOrdLessThan %bool %54 %float_1
OpStore %x_52_phi %55
OpSelectionMerge %56 None
OpBranchConditional %55 %57 %56
%57 = OpLabel
%58 = OpAccessChain %_ptr_Function_float %b %uint_1
%59 = OpLoad %float %58
%60 = OpFOrdLessThan %bool %59 %float_1
OpStore %x_51 %60
%61 = OpLoad %bool %x_51
OpStore %x_52_phi %61
OpBranch %56
%56 = OpLabel
%62 = OpLoad %bool %x_52_phi
OpSelectionMerge %63 None
OpBranchConditional %62 %64 %65
%64 = OpLabel
%66 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%67 = OpLoad %float %66
%68 = OpAccessChain %_ptr_Function_float %b %uint_0
%69 = OpLoad %float %68
%70 = OpAccessChain %_ptr_Function_float %b %uint_1
%71 = OpLoad %float %70
%72 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%73 = OpLoad %float %72
%74 = OpCompositeConstruct %v4float %67 %69 %71 %73
OpStore %x_GLF_color %74
OpBranch %63
%65 = OpLabel
%75 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%76 = OpLoad %float %75
%77 = OpCompositeConstruct %v4float %76 %76 %76 %76
OpStore %x_GLF_color %77
OpBranch %63
%63 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %78
%tint_symbol = OpFunctionParameter %main_out
%82 = OpLabel
%83 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %83
OpReturn
OpFunctionEnd
%main = OpFunction %void None %14
%85 = OpLabel
%86 = OpFunctionCall %void %main_1
%88 = OpLoad %v4float %x_GLF_color
%89 = OpCompositeConstruct %main_out %88
%87 = OpFunctionCall %void %tint_symbol_2 %89
OpReturn
OpFunctionEnd