blob: 6ded1917aadeae79e6d1f8a21eb653ae4671f63e [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 136
; Schema: 0
OpCapability Shader
%106 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vs_main "vs_main" %vs_main_vertex_index_Input %vs_main_loc0_Output %vs_main_position_Output %vs_main___point_size_Output
OpEntryPoint Fragment %fs_main "fs_main" %fs_main_loc0_Input %fs_main_loc0_Output
OpExecutionMode %fs_main OriginUpperLeft
OpMemberName %Uniforms 0 "u_scale"
OpMemberName %Uniforms 1 "u_offset"
OpName %Uniforms "Uniforms"
OpMemberName %uniforms_block 0 "inner"
OpName %uniforms_block "uniforms_block"
OpName %mySampler "mySampler"
OpName %myTexture "myTexture"
OpName %continue_execution "continue_execution"
OpName %vs_main_vertex_index_Input "vs_main_vertex_index_Input"
OpName %vs_main_loc0_Output "vs_main_loc0_Output"
OpName %vs_main_position_Output "vs_main_position_Output"
OpName %vs_main___point_size_Output "vs_main___point_size_Output"
OpName %fs_main_loc0_Input "fs_main_loc0_Input"
OpName %fs_main_loc0_Output "fs_main_loc0_Output"
OpName %vs_main_inner "vs_main_inner"
OpMemberName %VertexOutputs 0 "texcoords"
OpMemberName %VertexOutputs 1 "position"
OpName %VertexOutputs "VertexOutputs"
OpName %VertexIndex "VertexIndex"
OpName %texcoord "texcoord"
OpName %output "output"
OpName %flipY "flipY"
OpName %fs_main_inner "fs_main_inner"
OpName %texcoord_0 "texcoord"
OpName %clampedTexcoord "clampedTexcoord"
OpName %srcColor "srcColor"
OpName %vs_main "vs_main"
OpName %fs_main "fs_main"
OpMemberDecorate %Uniforms 0 Offset 0
OpMemberDecorate %Uniforms 1 Offset 8
OpMemberDecorate %uniforms_block 0 Offset 0
OpDecorate %uniforms_block Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 NonWritable
OpDecorate %mySampler DescriptorSet 0
OpDecorate %mySampler Binding 1
OpDecorate %myTexture DescriptorSet 0
OpDecorate %myTexture Binding 2
OpDecorate %vs_main_vertex_index_Input BuiltIn VertexIndex
OpDecorate %vs_main_loc0_Output Location 0
OpDecorate %vs_main_position_Output BuiltIn Position
OpDecorate %vs_main___point_size_Output BuiltIn PointSize
OpDecorate %fs_main_loc0_Input Location 0
OpDecorate %fs_main_loc0_Output Location 0
OpMemberDecorate %VertexOutputs 0 Offset 0
OpMemberDecorate %VertexOutputs 1 Offset 16
OpDecorate %_arr_v2float_uint_3 ArrayStride 8
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%Uniforms = OpTypeStruct %v2float %v2float
%uniforms_block = OpTypeStruct %Uniforms
%_ptr_Uniform_uniforms_block = OpTypePointer Uniform %uniforms_block
%1 = OpVariable %_ptr_Uniform_uniforms_block Uniform
%9 = OpTypeSampler
%_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9
%mySampler = OpVariable %_ptr_UniformConstant_9 UniformConstant
%12 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12
%myTexture = OpVariable %_ptr_UniformConstant_12 UniformConstant
%bool = OpTypeBool
%_ptr_Private_bool = OpTypePointer Private %bool
%true = OpConstantTrue %bool
%continue_execution = OpVariable %_ptr_Private_bool Private %true
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%vs_main_vertex_index_Input = OpVariable %_ptr_Input_uint Input
%_ptr_Output_v2float = OpTypePointer Output %v2float
%vs_main_loc0_Output = OpVariable %_ptr_Output_v2float Output
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%vs_main_position_Output = OpVariable %_ptr_Output_v4float Output
%_ptr_Output_float = OpTypePointer Output %float
%vs_main___point_size_Output = OpVariable %_ptr_Output_float Output
%_ptr_Input_v2float = OpTypePointer Input %v2float
%fs_main_loc0_Input = OpVariable %_ptr_Input_v2float Input
%fs_main_loc0_Output = OpVariable %_ptr_Output_v4float Output
%VertexOutputs = OpTypeStruct %v2float %v4float
%33 = OpTypeFunction %VertexOutputs %uint
%uint_3 = OpConstant %uint 3
%_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3
%_ptr_Function__arr_v2float_uint_3 = OpTypePointer Function %_arr_v2float_uint_3
%float_n0_5 = OpConstant %float -0.5
%float_0 = OpConstant %float 0
%40 = OpConstantComposite %v2float %float_n0_5 %float_0
%float_1_5 = OpConstant %float 1.5
%43 = OpConstantComposite %v2float %float_1_5 %float_0
%float_0_5 = OpConstant %float 0.5
%float_2 = OpConstant %float 2
%45 = OpConstantComposite %v2float %float_0_5 %float_2
%39 = OpConstantComposite %_arr_v2float_uint_3 %40 %43 %45
%_ptr_Function_VertexOutputs = OpTypePointer Function %VertexOutputs
%50 = OpConstantNull %VertexOutputs
%_ptr_Function_v4float = OpTypePointer Function %v4float
%uint_1 = OpConstant %uint 1
%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
%59 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Function_bool = OpTypePointer Function %bool
%float_n1 = OpConstant %float -1
%85 = OpConstantComposite %v2float %float_1 %float_n1
%88 = OpConstantComposite %v2float %float_0 %float_1
%103 = OpTypeFunction %v4float %v2float
%107 = OpConstantNull %v2float
%v2bool = OpTypeVector %bool 2
%false = OpConstantFalse %bool
%118 = OpConstantNull %v4float
%void = OpTypeVoid
%126 = OpTypeFunction %void
%vs_main_inner = OpFunction %VertexOutputs None %33
%VertexIndex = OpFunctionParameter %uint
%34 = OpLabel
%texcoord = OpVariable %_ptr_Function__arr_v2float_uint_3 Function
%output = OpVariable %_ptr_Function_VertexOutputs Function %50
%flipY = OpVariable %_ptr_Function_bool Function
OpStore %texcoord %39
%51 = OpAccessChain %_ptr_Function_v4float %output %uint_1
%54 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
%56 = OpLoad %v2float %54 None
%57 = OpVectorTimesScalar %v2float %56 %float_2
%58 = OpFSub %v2float %57 %59
%61 = OpCompositeConstruct %v4float %58 %float_0 %float_1
OpStore %51 %61 None
%62 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %uint_0
%65 = OpAccessChain %_ptr_Uniform_float %62 %uint_1
%67 = OpLoad %float %65 None
%68 = OpFOrdLessThan %bool %67 %float_0
OpStore %flipY %68
%71 = OpLoad %bool %flipY None
OpSelectionMerge %72 None
OpBranchConditional %71 %73 %74
%73 = OpLabel
%75 = OpAccessChain %_ptr_Function_v2float %output %uint_0
%76 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
%77 = OpLoad %v2float %76 None
%78 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %uint_0
%79 = OpLoad %v2float %78 None
%80 = OpFMul %v2float %77 %79
%81 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %uint_1
%82 = OpLoad %v2float %81 None
%83 = OpFAdd %v2float %80 %82
%84 = OpFMul %v2float %83 %85
%87 = OpFAdd %v2float %84 %88
OpStore %75 %87 None
OpBranch %72
%74 = OpLabel
%89 = OpAccessChain %_ptr_Function_v2float %output %uint_0
%90 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
%91 = OpLoad %v2float %90 None
%92 = OpFMul %v2float %91 %85
%93 = OpFAdd %v2float %92 %88
%94 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %uint_0
%95 = OpLoad %v2float %94 None
%96 = OpFMul %v2float %93 %95
%97 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %uint_1
%98 = OpLoad %v2float %97 None
%99 = OpFAdd %v2float %96 %98
OpStore %89 %99 None
OpBranch %72
%72 = OpLabel
%100 = OpLoad %VertexOutputs %output None
OpReturnValue %100
OpFunctionEnd
%fs_main_inner = OpFunction %v4float None %103
%texcoord_0 = OpFunctionParameter %v2float
%104 = OpLabel
%clampedTexcoord = OpVariable %_ptr_Function_v2float Function
%srcColor = OpVariable %_ptr_Function_v4float Function
%105 = OpExtInst %v2float %106 NClamp %texcoord_0 %107 %59
OpStore %clampedTexcoord %105
%109 = OpLoad %v2float %clampedTexcoord None
%110 = OpFOrdEqual %v2bool %109 %texcoord_0
%112 = OpAll %bool %110
%113 = OpLogicalNot %bool %112
OpSelectionMerge %114 None
OpBranchConditional %113 %115 %114
%115 = OpLabel
OpStore %continue_execution %false None
OpBranch %114
%114 = OpLabel
OpStore %srcColor %118
%119 = OpLoad %v4float %srcColor None
%120 = OpLoad %bool %continue_execution None
%121 = OpLogicalNot %bool %120
OpSelectionMerge %122 None
OpBranchConditional %121 %123 %122
%123 = OpLabel
OpKill
%122 = OpLabel
OpReturnValue %119
OpFunctionEnd
%vs_main = OpFunction %void None %126
%127 = OpLabel
%128 = OpLoad %uint %vs_main_vertex_index_Input None
%129 = OpFunctionCall %VertexOutputs %vs_main_inner %128
%130 = OpCompositeExtract %v2float %129 0
OpStore %vs_main_loc0_Output %130 None
%131 = OpCompositeExtract %v4float %129 1
OpStore %vs_main_position_Output %131 None
OpStore %vs_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
%fs_main = OpFunction %void None %126
%133 = OpLabel
%134 = OpLoad %v2float %fs_main_loc0_Input None
%135 = OpFunctionCall %v4float %fs_main_inner %134
OpStore %fs_main_loc0_Output %135 None
OpReturn
OpFunctionEnd