2021-06-21 19:27:26 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2022-11-09 19:58:59 +00:00
|
|
|
; Bound: 137
|
2021-06-21 19:27:26 +00:00
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
2022-11-02 02:25:38 +00:00
|
|
|
%118 = OpExtInstImport "GLSL.std.450"
|
2021-06-21 19:27:26 +00:00
|
|
|
OpMemoryModel Logical GLSL450
|
2021-08-05 17:34:19 +00:00
|
|
|
OpEntryPoint Vertex %vs_main "vs_main" %VertexIndex_1 %texcoords_1 %position_1 %vertex_point_size
|
|
|
|
OpEntryPoint Fragment %fs_main "fs_main" %texcoord_1 %value
|
2021-06-21 19:27:26 +00:00
|
|
|
OpExecutionMode %fs_main OriginUpperLeft
|
2022-11-09 19:58:59 +00:00
|
|
|
OpName %tint_discarded "tint_discarded"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %VertexIndex_1 "VertexIndex_1"
|
|
|
|
OpName %texcoords_1 "texcoords_1"
|
|
|
|
OpName %position_1 "position_1"
|
|
|
|
OpName %vertex_point_size "vertex_point_size"
|
|
|
|
OpName %texcoord_1 "texcoord_1"
|
|
|
|
OpName %value "value"
|
2022-11-02 02:25:38 +00:00
|
|
|
OpName %uniforms_block "uniforms_block"
|
|
|
|
OpMemberName %uniforms_block 0 "inner"
|
2021-06-21 19:27:26 +00:00
|
|
|
OpName %Uniforms "Uniforms"
|
|
|
|
OpMemberName %Uniforms 0 "u_scale"
|
|
|
|
OpMemberName %Uniforms 1 "u_offset"
|
|
|
|
OpName %uniforms "uniforms"
|
|
|
|
OpName %mySampler "mySampler"
|
|
|
|
OpName %myTexture "myTexture"
|
|
|
|
OpName %VertexOutputs "VertexOutputs"
|
|
|
|
OpMemberName %VertexOutputs 0 "texcoords"
|
|
|
|
OpMemberName %VertexOutputs 1 "position"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %vs_main_inner "vs_main_inner"
|
|
|
|
OpName %VertexIndex "VertexIndex"
|
2021-06-21 19:27:26 +00:00
|
|
|
OpName %texcoord "texcoord"
|
|
|
|
OpName %output "output"
|
|
|
|
OpName %flipY "flipY"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %vs_main "vs_main"
|
|
|
|
OpName %fs_main_inner "fs_main_inner"
|
|
|
|
OpName %texcoord_0 "texcoord"
|
2021-06-21 19:27:26 +00:00
|
|
|
OpName %clampedTexcoord "clampedTexcoord"
|
|
|
|
OpName %srcColor "srcColor"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %fs_main "fs_main"
|
|
|
|
OpDecorate %VertexIndex_1 BuiltIn VertexIndex
|
|
|
|
OpDecorate %texcoords_1 Location 0
|
|
|
|
OpDecorate %position_1 BuiltIn Position
|
|
|
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
|
|
OpDecorate %texcoord_1 Location 0
|
|
|
|
OpDecorate %value Location 0
|
2022-11-02 02:25:38 +00:00
|
|
|
OpDecorate %uniforms_block Block
|
|
|
|
OpMemberDecorate %uniforms_block 0 Offset 0
|
2021-06-21 19:27:26 +00:00
|
|
|
OpMemberDecorate %Uniforms 0 Offset 0
|
|
|
|
OpMemberDecorate %Uniforms 1 Offset 8
|
|
|
|
OpDecorate %uniforms NonWritable
|
|
|
|
OpDecorate %uniforms Binding 0
|
|
|
|
OpDecorate %uniforms DescriptorSet 0
|
|
|
|
OpDecorate %mySampler Binding 1
|
|
|
|
OpDecorate %mySampler DescriptorSet 0
|
|
|
|
OpDecorate %myTexture Binding 2
|
|
|
|
OpDecorate %myTexture DescriptorSet 0
|
|
|
|
OpMemberDecorate %VertexOutputs 0 Offset 0
|
|
|
|
OpMemberDecorate %VertexOutputs 1 Offset 16
|
|
|
|
OpDecorate %_arr_v2float_uint_3 ArrayStride 8
|
2022-11-09 19:58:59 +00:00
|
|
|
%bool = OpTypeBool
|
|
|
|
%2 = OpConstantNull %bool
|
|
|
|
%_ptr_Private_bool = OpTypePointer Private %bool
|
|
|
|
%tint_discarded = OpVariable %_ptr_Private_bool Private %2
|
2021-06-21 19:27:26 +00:00
|
|
|
%uint = OpTypeInt 32 0
|
|
|
|
%_ptr_Input_uint = OpTypePointer Input %uint
|
2021-08-05 17:34:19 +00:00
|
|
|
%VertexIndex_1 = OpVariable %_ptr_Input_uint Input
|
|
|
|
%float = OpTypeFloat 32
|
|
|
|
%v2float = OpTypeVector %float 2
|
2021-06-21 19:27:26 +00:00
|
|
|
%_ptr_Output_v2float = OpTypePointer Output %v2float
|
2022-11-09 19:58:59 +00:00
|
|
|
%12 = OpConstantNull %v2float
|
|
|
|
%texcoords_1 = OpVariable %_ptr_Output_v2float Output %12
|
2021-06-21 19:27:26 +00:00
|
|
|
%v4float = OpTypeVector %float 4
|
|
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
2022-11-09 19:58:59 +00:00
|
|
|
%16 = OpConstantNull %v4float
|
|
|
|
%position_1 = OpVariable %_ptr_Output_v4float Output %16
|
2021-08-05 17:34:19 +00:00
|
|
|
%_ptr_Output_float = OpTypePointer Output %float
|
2022-11-09 19:58:59 +00:00
|
|
|
%19 = OpConstantNull %float
|
|
|
|
%vertex_point_size = OpVariable %_ptr_Output_float Output %19
|
2021-06-21 19:27:26 +00:00
|
|
|
%_ptr_Input_v2float = OpTypePointer Input %v2float
|
2021-08-05 17:34:19 +00:00
|
|
|
%texcoord_1 = OpVariable %_ptr_Input_v2float Input
|
2022-11-09 19:58:59 +00:00
|
|
|
%value = OpVariable %_ptr_Output_v4float Output %16
|
2021-08-05 17:34:19 +00:00
|
|
|
%Uniforms = OpTypeStruct %v2float %v2float
|
2022-11-02 02:25:38 +00:00
|
|
|
%uniforms_block = OpTypeStruct %Uniforms
|
|
|
|
%_ptr_Uniform_uniforms_block = OpTypePointer Uniform %uniforms_block
|
|
|
|
%uniforms = OpVariable %_ptr_Uniform_uniforms_block Uniform
|
2022-11-09 19:58:59 +00:00
|
|
|
%29 = OpTypeSampler
|
|
|
|
%_ptr_UniformConstant_29 = OpTypePointer UniformConstant %29
|
|
|
|
%mySampler = OpVariable %_ptr_UniformConstant_29 UniformConstant
|
|
|
|
%32 = OpTypeImage %float 2D 0 0 0 1 Unknown
|
|
|
|
%_ptr_UniformConstant_32 = OpTypePointer UniformConstant %32
|
|
|
|
%myTexture = OpVariable %_ptr_UniformConstant_32 UniformConstant
|
2021-06-21 19:27:26 +00:00
|
|
|
%VertexOutputs = OpTypeStruct %v2float %v4float
|
2022-11-09 19:58:59 +00:00
|
|
|
%33 = OpTypeFunction %VertexOutputs %uint
|
2021-06-21 19:27:26 +00:00
|
|
|
%uint_3 = OpConstant %uint 3
|
|
|
|
%_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3
|
|
|
|
%float_n0_5 = OpConstant %float -0.5
|
2022-11-09 19:58:59 +00:00
|
|
|
%41 = OpConstantComposite %v2float %float_n0_5 %19
|
2021-06-21 19:27:26 +00:00
|
|
|
%float_1_5 = OpConstant %float 1.5
|
2022-11-09 19:58:59 +00:00
|
|
|
%43 = OpConstantComposite %v2float %float_1_5 %19
|
2021-06-21 19:27:26 +00:00
|
|
|
%float_0_5 = OpConstant %float 0.5
|
|
|
|
%float_2 = OpConstant %float 2
|
2022-11-09 19:58:59 +00:00
|
|
|
%46 = OpConstantComposite %v2float %float_0_5 %float_2
|
|
|
|
%47 = OpConstantComposite %_arr_v2float_uint_3 %41 %43 %46
|
2021-06-21 19:27:26 +00:00
|
|
|
%_ptr_Function__arr_v2float_uint_3 = OpTypePointer Function %_arr_v2float_uint_3
|
2022-11-09 19:58:59 +00:00
|
|
|
%50 = OpConstantNull %_arr_v2float_uint_3
|
2021-06-21 19:27:26 +00:00
|
|
|
%_ptr_Function_VertexOutputs = OpTypePointer Function %VertexOutputs
|
2022-11-09 19:58:59 +00:00
|
|
|
%53 = OpConstantNull %VertexOutputs
|
2021-06-21 19:27:26 +00:00
|
|
|
%uint_1 = OpConstant %uint 1
|
|
|
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
|
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
2021-08-05 17:34:19 +00:00
|
|
|
%float_1 = OpConstant %float 1
|
2022-11-09 19:58:59 +00:00
|
|
|
%62 = OpConstantComposite %v2float %float_1 %float_1
|
2021-06-21 19:27:26 +00:00
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
|
|
|
%_ptr_Function_bool = OpTypePointer Function %bool
|
|
|
|
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
|
|
|
|
%float_n1 = OpConstant %float -1
|
2022-11-09 19:58:59 +00:00
|
|
|
%89 = OpConstantComposite %v2float %float_1 %float_n1
|
|
|
|
%91 = OpConstantComposite %v2float %19 %float_1
|
2021-08-05 17:34:19 +00:00
|
|
|
%void = OpTypeVoid
|
2022-11-09 19:58:59 +00:00
|
|
|
%105 = OpTypeFunction %void
|
2022-11-02 02:25:38 +00:00
|
|
|
%113 = OpTypeFunction %v4float %v2float
|
2021-06-21 19:27:26 +00:00
|
|
|
%v2bool = OpTypeVector %bool 2
|
2022-11-09 19:58:59 +00:00
|
|
|
%true = OpConstantTrue %bool
|
|
|
|
%vs_main_inner = OpFunction %VertexOutputs None %33
|
2021-08-05 17:34:19 +00:00
|
|
|
%VertexIndex = OpFunctionParameter %uint
|
2022-11-09 19:58:59 +00:00
|
|
|
%37 = OpLabel
|
|
|
|
%texcoord = OpVariable %_ptr_Function__arr_v2float_uint_3 Function %50
|
|
|
|
%output = OpVariable %_ptr_Function_VertexOutputs Function %53
|
|
|
|
%flipY = OpVariable %_ptr_Function_bool Function %2
|
|
|
|
OpStore %texcoord %47
|
|
|
|
%56 = OpAccessChain %_ptr_Function_v4float %output %uint_1
|
|
|
|
%58 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
|
|
|
%59 = OpLoad %v2float %58
|
|
|
|
%60 = OpVectorTimesScalar %v2float %59 %float_2
|
|
|
|
%63 = OpFSub %v2float %60 %62
|
|
|
|
%64 = OpCompositeExtract %float %63 0
|
|
|
|
%65 = OpCompositeExtract %float %63 1
|
|
|
|
%66 = OpCompositeConstruct %v4float %64 %65 %19 %float_1
|
|
|
|
OpStore %56 %66
|
|
|
|
%69 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_0 %uint_0 %uint_1
|
|
|
|
%70 = OpLoad %float %69
|
|
|
|
%71 = OpFOrdLessThan %bool %70 %19
|
|
|
|
OpStore %flipY %71
|
|
|
|
%74 = OpLoad %bool %flipY
|
|
|
|
OpSelectionMerge %75 None
|
|
|
|
OpBranchConditional %74 %76 %77
|
|
|
|
%76 = OpLabel
|
|
|
|
%78 = OpAccessChain %_ptr_Function_v2float %output %uint_0
|
|
|
|
%79 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
|
|
|
%80 = OpLoad %v2float %79
|
|
|
|
%82 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0 %uint_0
|
|
|
|
%83 = OpLoad %v2float %82
|
|
|
|
%84 = OpFMul %v2float %80 %83
|
|
|
|
%85 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0 %uint_1
|
|
|
|
%86 = OpLoad %v2float %85
|
|
|
|
%87 = OpFAdd %v2float %84 %86
|
|
|
|
%90 = OpFMul %v2float %87 %89
|
|
|
|
%92 = OpFAdd %v2float %90 %91
|
|
|
|
OpStore %78 %92
|
|
|
|
OpBranch %75
|
|
|
|
%77 = OpLabel
|
|
|
|
%93 = OpAccessChain %_ptr_Function_v2float %output %uint_0
|
|
|
|
%94 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
|
|
|
%95 = OpLoad %v2float %94
|
|
|
|
%96 = OpFMul %v2float %95 %89
|
|
|
|
%97 = OpFAdd %v2float %96 %91
|
|
|
|
%98 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0 %uint_0
|
|
|
|
%99 = OpLoad %v2float %98
|
|
|
|
%100 = OpFMul %v2float %97 %99
|
|
|
|
%101 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0 %uint_1
|
|
|
|
%102 = OpLoad %v2float %101
|
|
|
|
%103 = OpFAdd %v2float %100 %102
|
|
|
|
OpStore %93 %103
|
|
|
|
OpBranch %75
|
2022-11-02 02:25:38 +00:00
|
|
|
%75 = OpLabel
|
2022-11-09 19:58:59 +00:00
|
|
|
%104 = OpLoad %VertexOutputs %output
|
|
|
|
OpReturnValue %104
|
2021-06-21 19:27:26 +00:00
|
|
|
OpFunctionEnd
|
2022-11-09 19:58:59 +00:00
|
|
|
%vs_main = OpFunction %void None %105
|
|
|
|
%108 = OpLabel
|
|
|
|
%110 = OpLoad %uint %VertexIndex_1
|
|
|
|
%109 = OpFunctionCall %VertexOutputs %vs_main_inner %110
|
|
|
|
%111 = OpCompositeExtract %v2float %109 0
|
|
|
|
OpStore %texcoords_1 %111
|
|
|
|
%112 = OpCompositeExtract %v4float %109 1
|
|
|
|
OpStore %position_1 %112
|
2021-08-05 17:34:19 +00:00
|
|
|
OpStore %vertex_point_size %float_1
|
2021-06-21 19:27:26 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-11-02 02:25:38 +00:00
|
|
|
%fs_main_inner = OpFunction %v4float None %113
|
2021-08-05 17:34:19 +00:00
|
|
|
%texcoord_0 = OpFunctionParameter %v2float
|
2022-11-02 02:25:38 +00:00
|
|
|
%116 = OpLabel
|
2022-11-09 19:58:59 +00:00
|
|
|
%clampedTexcoord = OpVariable %_ptr_Function_v2float Function %12
|
|
|
|
%srcColor = OpVariable %_ptr_Function_v4float Function %16
|
|
|
|
%117 = OpExtInst %v2float %118 NClamp %texcoord_0 %12 %62
|
2022-11-02 02:25:38 +00:00
|
|
|
OpStore %clampedTexcoord %117
|
|
|
|
%122 = OpLoad %v2float %clampedTexcoord
|
|
|
|
%123 = OpFOrdEqual %v2bool %122 %texcoord_0
|
|
|
|
%121 = OpAll %bool %123
|
|
|
|
%120 = OpLogicalNot %bool %121
|
|
|
|
OpSelectionMerge %125 None
|
|
|
|
OpBranchConditional %120 %126 %125
|
|
|
|
%126 = OpLabel
|
2022-11-09 19:58:59 +00:00
|
|
|
OpStore %tint_discarded %true
|
|
|
|
OpBranch %125
|
2022-11-02 02:25:38 +00:00
|
|
|
%125 = OpLabel
|
2022-11-09 19:58:59 +00:00
|
|
|
OpStore %srcColor %16
|
2022-11-02 02:25:38 +00:00
|
|
|
%129 = OpLoad %v4float %srcColor
|
|
|
|
OpReturnValue %129
|
2021-08-05 17:34:19 +00:00
|
|
|
OpFunctionEnd
|
2022-11-09 19:58:59 +00:00
|
|
|
%fs_main = OpFunction %void None %105
|
2022-11-02 02:25:38 +00:00
|
|
|
%131 = OpLabel
|
|
|
|
%133 = OpLoad %v2float %texcoord_1
|
|
|
|
%132 = OpFunctionCall %v4float %fs_main_inner %133
|
|
|
|
OpStore %value %132
|
2022-11-09 19:58:59 +00:00
|
|
|
%134 = OpLoad %bool %tint_discarded
|
|
|
|
OpSelectionMerge %135 None
|
|
|
|
OpBranchConditional %134 %136 %135
|
|
|
|
%136 = OpLabel
|
|
|
|
OpKill
|
|
|
|
%135 = OpLabel
|
2021-06-21 19:27:26 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|