blob: abb61fe1b290943f97f884f6731f067ae3fc647e [file] [log] [blame]
Ben Claytonda5424b2022-10-24 23:58:53 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Ben Clayton77a90cb2023-03-06 18:25:08 +00004; Bound: 60
Ben Claytonda5424b2022-10-24 23:58:53 +00005; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
9 OpEntryPoint Fragment %fragment_main "fragment_main"
10 OpEntryPoint GLCompute %compute_main "compute_main"
11 OpExecutionMode %fragment_main OriginUpperLeft
12 OpExecutionMode %compute_main LocalSize 1 1 1
13 OpName %value "value"
14 OpName %vertex_point_size "vertex_point_size"
15 OpName %arg_1 "arg_1"
16 OpName %arg_2 "arg_2"
Ben Clayton77a90cb2023-03-06 18:25:08 +000017 OpName %prevent_dce_block "prevent_dce_block"
18 OpMemberName %prevent_dce_block 0 "inner"
19 OpName %prevent_dce "prevent_dce"
Ben Claytonda5424b2022-10-24 23:58:53 +000020 OpName %textureGather_238ec4 "textureGather_238ec4"
21 OpName %res "res"
22 OpName %vertex_main_inner "vertex_main_inner"
23 OpName %vertex_main "vertex_main"
24 OpName %fragment_main "fragment_main"
25 OpName %compute_main "compute_main"
26 OpDecorate %value BuiltIn Position
27 OpDecorate %vertex_point_size BuiltIn PointSize
28 OpDecorate %arg_1 DescriptorSet 1
29 OpDecorate %arg_1 Binding 1
30 OpDecorate %arg_2 DescriptorSet 1
31 OpDecorate %arg_2 Binding 2
Ben Clayton77a90cb2023-03-06 18:25:08 +000032 OpDecorate %prevent_dce_block Block
33 OpMemberDecorate %prevent_dce_block 0 Offset 0
34 OpDecorate %prevent_dce DescriptorSet 2
35 OpDecorate %prevent_dce Binding 0
Ben Claytonda5424b2022-10-24 23:58:53 +000036 %float = OpTypeFloat 32
37 %v4float = OpTypeVector %float 4
38%_ptr_Output_v4float = OpTypePointer Output %v4float
39 %5 = OpConstantNull %v4float
40 %value = OpVariable %_ptr_Output_v4float Output %5
41%_ptr_Output_float = OpTypePointer Output %float
42 %8 = OpConstantNull %float
43%vertex_point_size = OpVariable %_ptr_Output_float Output %8
44 %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
45%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
46 %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
47 %14 = OpTypeSampler
48%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
49 %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
Ben Clayton77a90cb2023-03-06 18:25:08 +000050%prevent_dce_block = OpTypeStruct %v4float
51%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
52%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Ben Claytonda5424b2022-10-24 23:58:53 +000053 %void = OpTypeVoid
Ben Clayton77a90cb2023-03-06 18:25:08 +000054 %18 = OpTypeFunction %void
55 %25 = OpTypeSampledImage %11
Ben Claytonda5424b2022-10-24 23:58:53 +000056 %v3float = OpTypeVector %float 3
Ben Clayton4b606152022-11-04 17:06:03 +000057 %v2float = OpTypeVector %float 2
58 %float_1 = OpConstant %float 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000059 %30 = OpConstantComposite %v2float %float_1 %float_1
Ben Claytonda5424b2022-10-24 23:58:53 +000060 %uint = OpTypeInt 32 0
61 %uint_1 = OpConstant %uint 1
62 %int = OpTypeInt 32 1
63 %v2int = OpTypeVector %int 2
Ben Clayton4b606152022-11-04 17:06:03 +000064 %int_1 = OpConstant %int 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000065 %40 = OpConstantComposite %v2int %int_1 %int_1
Ben Claytonda5424b2022-10-24 23:58:53 +000066%_ptr_Function_v4float = OpTypePointer Function %v4float
Ben Clayton77a90cb2023-03-06 18:25:08 +000067 %uint_0 = OpConstant %uint 0
68%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
69 %47 = OpTypeFunction %v4float
70%textureGather_238ec4 = OpFunction %void None %18
71 %21 = OpLabel
Ben Claytonda5424b2022-10-24 23:58:53 +000072 %res = OpVariable %_ptr_Function_v4float Function %5
Ben Clayton77a90cb2023-03-06 18:25:08 +000073 %23 = OpLoad %14 %arg_2
74 %24 = OpLoad %11 %arg_1
75 %26 = OpSampledImage %25 %24 %23
76 %31 = OpCompositeExtract %float %30 0
77 %32 = OpCompositeExtract %float %30 1
78 %33 = OpConvertUToF %float %uint_1
79 %36 = OpCompositeConstruct %v3float %31 %32 %33
80 %22 = OpImageGather %v4float %26 %36 %uint_1 ConstOffset %40
81 OpStore %res %22
82 %45 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
83 %46 = OpLoad %v4float %res
84 OpStore %45 %46
Ben Claytonda5424b2022-10-24 23:58:53 +000085 OpReturn
86 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000087%vertex_main_inner = OpFunction %v4float None %47
88 %49 = OpLabel
89 %50 = OpFunctionCall %void %textureGather_238ec4
Ben Claytonda5424b2022-10-24 23:58:53 +000090 OpReturnValue %5
91 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000092%vertex_main = OpFunction %void None %18
93 %52 = OpLabel
94 %53 = OpFunctionCall %v4float %vertex_main_inner
95 OpStore %value %53
Ben Claytonda5424b2022-10-24 23:58:53 +000096 OpStore %vertex_point_size %float_1
97 OpReturn
98 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000099%fragment_main = OpFunction %void None %18
100 %55 = OpLabel
101 %56 = OpFunctionCall %void %textureGather_238ec4
Ben Claytonda5424b2022-10-24 23:58:53 +0000102 OpReturn
103 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +0000104%compute_main = OpFunction %void None %18
105 %58 = OpLabel
106 %59 = OpFunctionCall %void %textureGather_238ec4
Ben Claytonda5424b2022-10-24 23:58:53 +0000107 OpReturn
108 OpFunctionEnd