blob: 3220a83c2729a06a8e5416ba749f7115569a1d29 [file] [log] [blame]
Ben Clayton2e376a92022-10-26 18:47:02 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Ben Clayton77a90cb2023-03-06 18:25:08 +00004; Bound: 68
Ben Clayton2e376a92022-10-26 18:47:02 +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 Clayton2e376a92022-10-26 18:47:02 +000020 OpName %textureGather_831549 "textureGather_831549"
21 OpName %arg_3 "arg_3"
22 OpName %arg_4 "arg_4"
23 OpName %res "res"
24 OpName %vertex_main_inner "vertex_main_inner"
25 OpName %vertex_main "vertex_main"
26 OpName %fragment_main "fragment_main"
27 OpName %compute_main "compute_main"
28 OpDecorate %value BuiltIn Position
29 OpDecorate %vertex_point_size BuiltIn PointSize
30 OpDecorate %arg_1 DescriptorSet 1
31 OpDecorate %arg_1 Binding 1
32 OpDecorate %arg_2 DescriptorSet 1
33 OpDecorate %arg_2 Binding 2
Ben Clayton77a90cb2023-03-06 18:25:08 +000034 OpDecorate %prevent_dce_block Block
35 OpMemberDecorate %prevent_dce_block 0 Offset 0
36 OpDecorate %prevent_dce DescriptorSet 2
37 OpDecorate %prevent_dce Binding 0
Ben Clayton2e376a92022-10-26 18:47:02 +000038 %float = OpTypeFloat 32
39 %v4float = OpTypeVector %float 4
40%_ptr_Output_v4float = OpTypePointer Output %v4float
41 %5 = OpConstantNull %v4float
42 %value = OpVariable %_ptr_Output_v4float Output %5
43%_ptr_Output_float = OpTypePointer Output %float
44 %8 = OpConstantNull %float
45%vertex_point_size = OpVariable %_ptr_Output_float Output %8
46 %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
47%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
48 %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
49 %14 = OpTypeSampler
50%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
51 %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
Ben Clayton77a90cb2023-03-06 18:25:08 +000052%prevent_dce_block = OpTypeStruct %v4float
53%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
54%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Ben Clayton2e376a92022-10-26 18:47:02 +000055 %void = OpTypeVoid
Ben Clayton77a90cb2023-03-06 18:25:08 +000056 %18 = OpTypeFunction %void
Ben Clayton2e376a92022-10-26 18:47:02 +000057 %v2float = OpTypeVector %float 2
Ben Clayton4b606152022-11-04 17:06:03 +000058 %float_1 = OpConstant %float 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000059 %24 = OpConstantComposite %v2float %float_1 %float_1
Ben Clayton2e376a92022-10-26 18:47:02 +000060%_ptr_Function_v2float = OpTypePointer Function %v2float
Ben Clayton77a90cb2023-03-06 18:25:08 +000061 %27 = OpConstantNull %v2float
Ben Clayton2e376a92022-10-26 18:47:02 +000062 %int = OpTypeInt 32 1
63 %int_1 = OpConstant %int 1
64%_ptr_Function_int = OpTypePointer Function %int
Ben Clayton77a90cb2023-03-06 18:25:08 +000065 %32 = OpConstantNull %int
66 %36 = OpTypeSampledImage %11
Ben Clayton2e376a92022-10-26 18:47:02 +000067 %v3float = OpTypeVector %float 3
68 %uint = OpTypeInt 32 0
69 %uint_1 = OpConstant %uint 1
70 %v2int = OpTypeVector %int 2
Ben Clayton77a90cb2023-03-06 18:25:08 +000071 %48 = OpConstantComposite %v2int %int_1 %int_1
Ben Clayton2e376a92022-10-26 18:47:02 +000072%_ptr_Function_v4float = OpTypePointer Function %v4float
Ben Clayton77a90cb2023-03-06 18:25:08 +000073 %uint_0 = OpConstant %uint 0
74%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
75 %55 = OpTypeFunction %v4float
76%textureGather_831549 = OpFunction %void None %18
77 %21 = OpLabel
78 %arg_3 = OpVariable %_ptr_Function_v2float Function %27
79 %arg_4 = OpVariable %_ptr_Function_int Function %32
Ben Clayton2e376a92022-10-26 18:47:02 +000080 %res = OpVariable %_ptr_Function_v4float Function %5
Ben Clayton77a90cb2023-03-06 18:25:08 +000081 OpStore %arg_3 %24
Ben Clayton2e376a92022-10-26 18:47:02 +000082 OpStore %arg_4 %int_1
Ben Clayton77a90cb2023-03-06 18:25:08 +000083 %34 = OpLoad %14 %arg_2
84 %35 = OpLoad %11 %arg_1
85 %37 = OpSampledImage %36 %35 %34
86 %39 = OpLoad %v2float %arg_3
87 %40 = OpCompositeExtract %float %39 0
88 %41 = OpCompositeExtract %float %39 1
89 %43 = OpLoad %int %arg_4
90 %42 = OpConvertSToF %float %43
91 %44 = OpCompositeConstruct %v3float %40 %41 %42
92 %33 = OpImageGather %v4float %37 %44 %uint_1 ConstOffset %48
93 OpStore %res %33
94 %53 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
95 %54 = OpLoad %v4float %res
96 OpStore %53 %54
Ben Clayton2e376a92022-10-26 18:47:02 +000097 OpReturn
98 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000099%vertex_main_inner = OpFunction %v4float None %55
100 %57 = OpLabel
101 %58 = OpFunctionCall %void %textureGather_831549
Ben Clayton2e376a92022-10-26 18:47:02 +0000102 OpReturnValue %5
103 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +0000104%vertex_main = OpFunction %void None %18
105 %60 = OpLabel
106 %61 = OpFunctionCall %v4float %vertex_main_inner
107 OpStore %value %61
Ben Clayton2e376a92022-10-26 18:47:02 +0000108 OpStore %vertex_point_size %float_1
109 OpReturn
110 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +0000111%fragment_main = OpFunction %void None %18
112 %63 = OpLabel
113 %64 = OpFunctionCall %void %textureGather_831549
Ben Clayton2e376a92022-10-26 18:47:02 +0000114 OpReturn
115 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +0000116%compute_main = OpFunction %void None %18
117 %66 = OpLabel
118 %67 = OpFunctionCall %void %textureGather_831549
Ben Clayton2e376a92022-10-26 18:47:02 +0000119 OpReturn
120 OpFunctionEnd