blob: 1529e3a581d318800451ad635cc46f17d931fd2f [file] [log] [blame]
dan sinclair1b77b6c2024-08-06 15:47:05 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 1
4; Bound: 60
5; Schema: 0
6 OpCapability Shader
7 OpCapability ImageQuery
8 OpMemoryModel Logical GLSL450
9 OpEntryPoint Fragment %fragment_main "fragment_main"
10 OpEntryPoint GLCompute %compute_main "compute_main"
11 OpEntryPoint Vertex %vertex_main "vertex_main" %vertex_main_position_Output %vertex_main_loc0_Output %vertex_main___point_size_Output
12 OpExecutionMode %fragment_main OriginUpperLeft
13 OpExecutionMode %compute_main LocalSize 1 1 1
James Price71c1d542024-10-10 23:01:19 +000014 OpMemberName %prevent_dce_block 0 "inner"
15 OpName %prevent_dce_block "prevent_dce_block"
dan sinclair1b77b6c2024-08-06 15:47:05 +000016 OpName %arg_0 "arg_0"
17 OpName %vertex_main_position_Output "vertex_main_position_Output"
18 OpName %vertex_main_loc0_Output "vertex_main_loc0_Output"
19 OpName %vertex_main___point_size_Output "vertex_main___point_size_Output"
20 OpName %textureDimensions_f7bac5 "textureDimensions_f7bac5"
21 OpName %res "res"
22 OpName %fragment_main "fragment_main"
23 OpName %compute_main "compute_main"
24 OpName %vertex_main_inner "vertex_main_inner"
25 OpMemberName %VertexOutput 0 "pos"
26 OpMemberName %VertexOutput 1 "prevent_dce"
27 OpName %VertexOutput "VertexOutput"
28 OpName %out "out"
29 OpName %vertex_main "vertex_main"
James Price71c1d542024-10-10 23:01:19 +000030 OpMemberDecorate %prevent_dce_block 0 Offset 0
31 OpDecorate %prevent_dce_block Block
dan sinclair1b77b6c2024-08-06 15:47:05 +000032 OpDecorate %1 DescriptorSet 0
33 OpDecorate %1 Binding 0
dan sinclaird117d652024-08-21 01:20:00 +000034 OpDecorate %1 Coherent
dan sinclair1b77b6c2024-08-06 15:47:05 +000035 OpDecorate %arg_0 DescriptorSet 1
36 OpDecorate %arg_0 Binding 0
37 OpDecorate %arg_0 NonWritable
38 OpDecorate %vertex_main_position_Output BuiltIn Position
39 OpDecorate %vertex_main_loc0_Output Location 0
40 OpDecorate %vertex_main_loc0_Output Flat
41 OpDecorate %vertex_main___point_size_Output BuiltIn PointSize
42 OpMemberDecorate %VertexOutput 0 Offset 0
43 OpMemberDecorate %VertexOutput 1 Offset 16
44 %uint = OpTypeInt 32 0
45 %v2uint = OpTypeVector %uint 2
James Price71c1d542024-10-10 23:01:19 +000046%prevent_dce_block = OpTypeStruct %v2uint
47%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
48 %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
dan sinclair1b77b6c2024-08-06 15:47:05 +000049 %int = OpTypeInt 32 1
50 %8 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
51%_ptr_UniformConstant_8 = OpTypePointer UniformConstant %8
52 %arg_0 = OpVariable %_ptr_UniformConstant_8 UniformConstant
53 %float = OpTypeFloat 32
54 %v4float = OpTypeVector %float 4
55%_ptr_Output_v4float = OpTypePointer Output %v4float
56%vertex_main_position_Output = OpVariable %_ptr_Output_v4float Output
57%_ptr_Output_v2uint = OpTypePointer Output %v2uint
58%vertex_main_loc0_Output = OpVariable %_ptr_Output_v2uint Output
59%_ptr_Output_float = OpTypePointer Output %float
60%vertex_main___point_size_Output = OpVariable %_ptr_Output_float Output
61 %19 = OpTypeFunction %v2uint
62 %v3uint = OpTypeVector %uint 3
63%_ptr_Function_v2uint = OpTypePointer Function %v2uint
64 %void = OpTypeVoid
65 %30 = OpTypeFunction %void
66%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
67 %uint_0 = OpConstant %uint 0
68%VertexOutput = OpTypeStruct %v4float %v2uint
69 %42 = OpTypeFunction %VertexOutput
70%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
71 %46 = OpConstantNull %VertexOutput
72%_ptr_Function_v4float = OpTypePointer Function %v4float
73 %49 = OpConstantNull %v4float
74 %uint_1 = OpConstant %uint 1
75 %float_1 = OpConstant %float 1
76%textureDimensions_f7bac5 = OpFunction %v2uint None %19
77 %20 = OpLabel
78 %res = OpVariable %_ptr_Function_v2uint Function
dan sinclair50260412024-08-28 19:43:27 +000079 %21 = OpLoad %8 %arg_0 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000080 %22 = OpImageQuerySize %v3uint %21
81 %24 = OpVectorShuffle %v2uint %22 %22 0 1
82 OpStore %res %24
dan sinclair50260412024-08-28 19:43:27 +000083 %27 = OpLoad %v2uint %res None
dan sinclair1b77b6c2024-08-06 15:47:05 +000084 OpReturnValue %27
85 OpFunctionEnd
86%fragment_main = OpFunction %void None %30
87 %31 = OpLabel
88 %32 = OpFunctionCall %v2uint %textureDimensions_f7bac5
89 %33 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
dan sinclair50260412024-08-28 19:43:27 +000090 OpStore %33 %32 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000091 OpReturn
92 OpFunctionEnd
93%compute_main = OpFunction %void None %30
94 %37 = OpLabel
95 %38 = OpFunctionCall %v2uint %textureDimensions_f7bac5
96 %39 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0
dan sinclair50260412024-08-28 19:43:27 +000097 OpStore %39 %38 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000098 OpReturn
99 OpFunctionEnd
100%vertex_main_inner = OpFunction %VertexOutput None %42
101 %43 = OpLabel
102 %out = OpVariable %_ptr_Function_VertexOutput Function %46
103 %47 = OpAccessChain %_ptr_Function_v4float %out %uint_0
dan sinclair50260412024-08-28 19:43:27 +0000104 OpStore %47 %49 None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000105 %50 = OpAccessChain %_ptr_Function_v2uint %out %uint_1
106 %52 = OpFunctionCall %v2uint %textureDimensions_f7bac5
dan sinclair50260412024-08-28 19:43:27 +0000107 OpStore %50 %52 None
108 %53 = OpLoad %VertexOutput %out None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000109 OpReturnValue %53
110 OpFunctionEnd
111%vertex_main = OpFunction %void None %30
112 %55 = OpLabel
113 %56 = OpFunctionCall %VertexOutput %vertex_main_inner
114 %57 = OpCompositeExtract %v4float %56 0
dan sinclair50260412024-08-28 19:43:27 +0000115 OpStore %vertex_main_position_Output %57 None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000116 %58 = OpCompositeExtract %v2uint %56 1
dan sinclair50260412024-08-28 19:43:27 +0000117 OpStore %vertex_main_loc0_Output %58 None
118 OpStore %vertex_main___point_size_Output %float_1 None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000119 OpReturn
120 OpFunctionEnd