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