Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 0 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 4 | ; Bound: 80 |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 8 | OpEntryPoint Fragment %fragment_main "fragment_main" |
| 9 | OpEntryPoint GLCompute %compute_main "compute_main" |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 10 | OpEntryPoint Vertex %vertex_main "vertex_main" %pos_1 %prevent_dce_1 %vertex_point_size |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 11 | OpExecutionMode %fragment_main OriginUpperLeft |
| 12 | OpExecutionMode %compute_main LocalSize 1 1 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 13 | OpName %pos_1 "pos_1" |
| 14 | OpName %prevent_dce_1 "prevent_dce_1" |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 15 | OpName %vertex_point_size "vertex_point_size" |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 16 | OpName %prevent_dce_block "prevent_dce_block" |
| 17 | OpMemberName %prevent_dce_block 0 "inner" |
| 18 | OpName %prevent_dce "prevent_dce" |
Natalie Chouinard | 6ee6330 | 2024-06-25 20:45:30 +0000 | [diff] [blame] | 19 | OpName %arg_0 "arg_0" |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 20 | OpName %textureLoad_a24be1 "textureLoad_a24be1" |
| 21 | OpName %arg_1 "arg_1" |
| 22 | OpName %arg_2 "arg_2" |
| 23 | OpName %arg_3 "arg_3" |
| 24 | OpName %res "res" |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 25 | OpName %fragment_main "fragment_main" |
| 26 | OpName %compute_main "compute_main" |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 27 | OpName %VertexOutput "VertexOutput" |
| 28 | OpMemberName %VertexOutput 0 "pos" |
| 29 | OpMemberName %VertexOutput 1 "prevent_dce" |
| 30 | OpName %vertex_main_inner "vertex_main_inner" |
| 31 | OpName %out "out" |
| 32 | OpName %vertex_main "vertex_main" |
| 33 | OpDecorate %pos_1 BuiltIn Position |
| 34 | OpDecorate %prevent_dce_1 Location 0 |
| 35 | OpDecorate %prevent_dce_1 Flat |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 36 | OpDecorate %vertex_point_size BuiltIn PointSize |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 37 | OpDecorate %prevent_dce_block Block |
| 38 | OpMemberDecorate %prevent_dce_block 0 Offset 0 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 39 | OpDecorate %prevent_dce DescriptorSet 0 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 40 | OpDecorate %prevent_dce Binding 0 |
Natalie Chouinard | 6ee6330 | 2024-06-25 20:45:30 +0000 | [diff] [blame] | 41 | OpDecorate %arg_0 DescriptorSet 1 |
| 42 | OpDecorate %arg_0 Binding 0 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 43 | OpMemberDecorate %VertexOutput 0 Offset 0 |
| 44 | OpMemberDecorate %VertexOutput 1 Offset 16 |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 45 | %float = OpTypeFloat 32 |
| 46 | %v4float = OpTypeVector %float 4 |
| 47 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 48 | %5 = OpConstantNull %v4float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 49 | %pos_1 = OpVariable %_ptr_Output_v4float Output %5 |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 50 | %uint = OpTypeInt 32 0 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 51 | %v4uint = OpTypeVector %uint 4 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 52 | %_ptr_Output_v4uint = OpTypePointer Output %v4uint |
| 53 | %10 = OpConstantNull %v4uint |
| 54 | %prevent_dce_1 = OpVariable %_ptr_Output_v4uint Output %10 |
| 55 | %_ptr_Output_float = OpTypePointer Output %float |
| 56 | %13 = OpConstantNull %float |
| 57 | %vertex_point_size = OpVariable %_ptr_Output_float Output %13 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 58 | %prevent_dce_block = OpTypeStruct %v4uint |
| 59 | %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| 60 | %prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
Natalie Chouinard | 6ee6330 | 2024-06-25 20:45:30 +0000 | [diff] [blame] | 61 | %19 = OpTypeImage %uint 2D 0 1 0 1 Unknown |
| 62 | %_ptr_UniformConstant_19 = OpTypePointer UniformConstant %19 |
| 63 | %arg_0 = OpVariable %_ptr_UniformConstant_19 UniformConstant |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 64 | %20 = OpTypeFunction %v4uint |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 65 | %v2uint = OpTypeVector %uint 2 |
Ben Clayton | 4b60615 | 2022-11-04 17:06:03 +0000 | [diff] [blame] | 66 | %uint_1 = OpConstant %uint 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 67 | %25 = OpConstantComposite %v2uint %uint_1 %uint_1 |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 68 | %_ptr_Function_v2uint = OpTypePointer Function %v2uint |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 69 | %28 = OpConstantNull %v2uint |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 70 | %int = OpTypeInt 32 1 |
| 71 | %int_1 = OpConstant %int 1 |
| 72 | %_ptr_Function_int = OpTypePointer Function %int |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 73 | %33 = OpConstantNull %int |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 74 | %_ptr_Function_uint = OpTypePointer Function %uint |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 75 | %36 = OpConstantNull %uint |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 76 | %v3uint = OpTypeVector %uint 3 |
| 77 | %_ptr_Function_v4uint = OpTypePointer Function %v4uint |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 78 | %void = OpTypeVoid |
| 79 | %50 = OpTypeFunction %void |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 80 | %uint_0 = OpConstant %uint 0 |
| 81 | %_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 82 | %VertexOutput = OpTypeStruct %v4float %v4uint |
| 83 | %62 = OpTypeFunction %VertexOutput |
| 84 | %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
| 85 | %68 = OpConstantNull %VertexOutput |
| 86 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 87 | %float_1 = OpConstant %float 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 88 | %textureLoad_a24be1 = OpFunction %v4uint None %20 |
| 89 | %22 = OpLabel |
| 90 | %arg_1 = OpVariable %_ptr_Function_v2uint Function %28 |
| 91 | %arg_2 = OpVariable %_ptr_Function_int Function %33 |
| 92 | %arg_3 = OpVariable %_ptr_Function_uint Function %36 |
| 93 | %res = OpVariable %_ptr_Function_v4uint Function %10 |
| 94 | OpStore %arg_1 %25 |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 95 | OpStore %arg_2 %int_1 |
| 96 | OpStore %arg_3 %uint_1 |
Natalie Chouinard | 6ee6330 | 2024-06-25 20:45:30 +0000 | [diff] [blame] | 97 | %38 = OpLoad %19 %arg_0 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 98 | %40 = OpLoad %v2uint %arg_1 |
| 99 | %41 = OpCompositeExtract %uint %40 0 |
| 100 | %42 = OpCompositeExtract %uint %40 1 |
| 101 | %44 = OpLoad %int %arg_2 |
| 102 | %43 = OpBitcast %uint %44 |
| 103 | %45 = OpCompositeConstruct %v3uint %41 %42 %43 |
| 104 | %46 = OpLoad %uint %arg_3 |
| 105 | %37 = OpImageFetch %v4uint %38 %45 Lod %46 |
| 106 | OpStore %res %37 |
| 107 | %49 = OpLoad %v4uint %res |
| 108 | OpReturnValue %49 |
| 109 | OpFunctionEnd |
| 110 | %fragment_main = OpFunction %void None %50 |
| 111 | %53 = OpLabel |
| 112 | %56 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0 |
| 113 | %57 = OpFunctionCall %v4uint %textureLoad_a24be1 |
| 114 | OpStore %56 %57 |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 115 | OpReturn |
| 116 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 117 | %compute_main = OpFunction %void None %50 |
| 118 | %59 = OpLabel |
| 119 | %60 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0 |
| 120 | %61 = OpFunctionCall %v4uint %textureLoad_a24be1 |
| 121 | OpStore %60 %61 |
| 122 | OpReturn |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 123 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 124 | %vertex_main_inner = OpFunction %VertexOutput None %62 |
| 125 | %65 = OpLabel |
| 126 | %out = OpVariable %_ptr_Function_VertexOutput Function %68 |
| 127 | %70 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| 128 | OpStore %70 %5 |
| 129 | %71 = OpAccessChain %_ptr_Function_v4uint %out %uint_1 |
| 130 | %72 = OpFunctionCall %v4uint %textureLoad_a24be1 |
| 131 | OpStore %71 %72 |
| 132 | %73 = OpLoad %VertexOutput %out |
| 133 | OpReturnValue %73 |
| 134 | OpFunctionEnd |
| 135 | %vertex_main = OpFunction %void None %50 |
| 136 | %75 = OpLabel |
| 137 | %76 = OpFunctionCall %VertexOutput %vertex_main_inner |
| 138 | %77 = OpCompositeExtract %v4float %76 0 |
| 139 | OpStore %pos_1 %77 |
| 140 | %78 = OpCompositeExtract %v4uint %76 1 |
| 141 | OpStore %prevent_dce_1 %78 |
Ben Clayton | 2e376a9 | 2022-10-26 18:47:02 +0000 | [diff] [blame] | 142 | OpStore %vertex_point_size %float_1 |
| 143 | OpReturn |
| 144 | OpFunctionEnd |