James Price | 88c231b | 2023-08-15 12:47:28 +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: 67 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
James Price | 88c231b | 2023-08-15 12:47:28 +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 |
James Price | 88c231b | 2023-08-15 12:47:28 +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" |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 15 | OpName %vertex_point_size "vertex_point_size" |
| 16 | OpName %arg_0 "arg_0" |
| 17 | OpName %prevent_dce_block "prevent_dce_block" |
| 18 | OpMemberName %prevent_dce_block 0 "inner" |
| 19 | OpName %prevent_dce "prevent_dce" |
| 20 | OpName %textureLoad_a6b61d "textureLoad_a6b61d" |
| 21 | OpName %res "res" |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 22 | OpName %fragment_main "fragment_main" |
| 23 | OpName %compute_main "compute_main" |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 24 | OpName %VertexOutput "VertexOutput" |
| 25 | OpMemberName %VertexOutput 0 "pos" |
| 26 | OpMemberName %VertexOutput 1 "prevent_dce" |
| 27 | OpName %vertex_main_inner "vertex_main_inner" |
| 28 | OpName %out "out" |
| 29 | OpName %vertex_main "vertex_main" |
| 30 | OpDecorate %pos_1 BuiltIn Position |
| 31 | OpDecorate %prevent_dce_1 Location 0 |
| 32 | OpDecorate %prevent_dce_1 Flat |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 33 | OpDecorate %vertex_point_size BuiltIn PointSize |
| 34 | OpDecorate %arg_0 NonWritable |
| 35 | OpDecorate %arg_0 DescriptorSet 1 |
| 36 | OpDecorate %arg_0 Binding 0 |
| 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 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 40 | OpDecorate %prevent_dce Binding 0 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 41 | OpMemberDecorate %VertexOutput 0 Offset 0 |
| 42 | OpMemberDecorate %VertexOutput 1 Offset 16 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 43 | %float = OpTypeFloat 32 |
| 44 | %v4float = OpTypeVector %float 4 |
| 45 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 46 | %5 = OpConstantNull %v4float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 47 | %pos_1 = OpVariable %_ptr_Output_v4float Output %5 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 48 | %int = OpTypeInt 32 1 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 49 | %v4int = OpTypeVector %int 4 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 50 | %_ptr_Output_v4int = OpTypePointer Output %v4int |
| 51 | %10 = OpConstantNull %v4int |
| 52 | %prevent_dce_1 = OpVariable %_ptr_Output_v4int Output %10 |
| 53 | %_ptr_Output_float = OpTypePointer Output %float |
| 54 | %13 = OpConstantNull %float |
| 55 | %vertex_point_size = OpVariable %_ptr_Output_float Output %13 |
| 56 | %16 = OpTypeImage %int 2D 0 1 0 2 Rgba32i |
| 57 | %_ptr_UniformConstant_16 = OpTypePointer UniformConstant %16 |
| 58 | %arg_0 = OpVariable %_ptr_UniformConstant_16 UniformConstant |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 59 | %prevent_dce_block = OpTypeStruct %v4int |
| 60 | %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| 61 | %prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 62 | %20 = OpTypeFunction %v4int |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 63 | %v3int = OpTypeVector %int 3 |
| 64 | %v2int = OpTypeVector %int 2 |
| 65 | %int_1 = OpConstant %int 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 66 | %28 = OpConstantComposite %v2int %int_1 %int_1 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 67 | %_ptr_Function_v4int = OpTypePointer Function %v4int |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 68 | %void = OpTypeVoid |
| 69 | %35 = OpTypeFunction %void |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 70 | %uint = OpTypeInt 32 0 |
| 71 | %uint_0 = OpConstant %uint 0 |
| 72 | %_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 73 | %VertexOutput = OpTypeStruct %v4float %v4int |
| 74 | %48 = OpTypeFunction %VertexOutput |
| 75 | %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
| 76 | %54 = OpConstantNull %VertexOutput |
| 77 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
| 78 | %uint_1 = OpConstant %uint 1 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 79 | %float_1 = OpConstant %float 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 80 | %textureLoad_a6b61d = OpFunction %v4int None %20 |
| 81 | %22 = OpLabel |
| 82 | %res = OpVariable %_ptr_Function_v4int Function %10 |
| 83 | %24 = OpLoad %16 %arg_0 |
| 84 | %29 = OpCompositeExtract %int %28 0 |
| 85 | %30 = OpCompositeExtract %int %28 1 |
| 86 | %31 = OpCompositeConstruct %v3int %29 %30 %int_1 |
| 87 | %23 = OpImageRead %v4int %24 %31 |
| 88 | OpStore %res %23 |
| 89 | %34 = OpLoad %v4int %res |
| 90 | OpReturnValue %34 |
| 91 | OpFunctionEnd |
| 92 | %fragment_main = OpFunction %void None %35 |
| 93 | %38 = OpLabel |
| 94 | %42 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0 |
| 95 | %43 = OpFunctionCall %v4int %textureLoad_a6b61d |
| 96 | OpStore %42 %43 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 97 | OpReturn |
| 98 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 99 | %compute_main = OpFunction %void None %35 |
| 100 | %45 = OpLabel |
| 101 | %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0 |
| 102 | %47 = OpFunctionCall %v4int %textureLoad_a6b61d |
| 103 | OpStore %46 %47 |
| 104 | OpReturn |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 105 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 106 | %vertex_main_inner = OpFunction %VertexOutput None %48 |
| 107 | %51 = OpLabel |
| 108 | %out = OpVariable %_ptr_Function_VertexOutput Function %54 |
| 109 | %56 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| 110 | OpStore %56 %5 |
| 111 | %58 = OpAccessChain %_ptr_Function_v4int %out %uint_1 |
| 112 | %59 = OpFunctionCall %v4int %textureLoad_a6b61d |
| 113 | OpStore %58 %59 |
| 114 | %60 = OpLoad %VertexOutput %out |
| 115 | OpReturnValue %60 |
| 116 | OpFunctionEnd |
| 117 | %vertex_main = OpFunction %void None %35 |
| 118 | %62 = OpLabel |
| 119 | %63 = OpFunctionCall %VertexOutput %vertex_main_inner |
| 120 | %64 = OpCompositeExtract %v4float %63 0 |
| 121 | OpStore %pos_1 %64 |
| 122 | %65 = OpCompositeExtract %v4int %63 1 |
| 123 | OpStore %prevent_dce_1 %65 |
James Price | 88c231b | 2023-08-15 12:47:28 +0000 | [diff] [blame] | 124 | OpStore %vertex_point_size %float_1 |
| 125 | OpReturn |
| 126 | OpFunctionEnd |