Ben Clayton | da5424b | 2022-10-24 23:58:53 +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: 60 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpCapability Sampled1D |
| 8 | OpMemoryModel Logical GLSL450 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 9 | OpEntryPoint Fragment %fragment_main "fragment_main" |
| 10 | OpEntryPoint GLCompute %compute_main "compute_main" |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 11 | OpEntryPoint Vertex %vertex_main "vertex_main" %pos_1 %prevent_dce_1 %vertex_point_size |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 12 | OpExecutionMode %fragment_main OriginUpperLeft |
| 13 | OpExecutionMode %compute_main LocalSize 1 1 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 14 | OpName %pos_1 "pos_1" |
| 15 | OpName %prevent_dce_1 "prevent_dce_1" |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 16 | OpName %vertex_point_size "vertex_point_size" |
| 17 | OpName %arg_0 "arg_0" |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 18 | OpName %prevent_dce_block "prevent_dce_block" |
| 19 | OpMemberName %prevent_dce_block 0 "inner" |
| 20 | OpName %prevent_dce "prevent_dce" |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 21 | OpName %textureLoad_0cb698 "textureLoad_0cb698" |
| 22 | OpName %res "res" |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 23 | OpName %fragment_main "fragment_main" |
| 24 | OpName %compute_main "compute_main" |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 25 | OpName %VertexOutput "VertexOutput" |
| 26 | OpMemberName %VertexOutput 0 "pos" |
| 27 | OpMemberName %VertexOutput 1 "prevent_dce" |
| 28 | OpName %vertex_main_inner "vertex_main_inner" |
| 29 | OpName %out "out" |
| 30 | OpName %vertex_main "vertex_main" |
| 31 | OpDecorate %pos_1 BuiltIn Position |
| 32 | OpDecorate %prevent_dce_1 Location 0 |
| 33 | OpDecorate %prevent_dce_1 Flat |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 34 | OpDecorate %vertex_point_size BuiltIn PointSize |
| 35 | OpDecorate %arg_0 DescriptorSet 1 |
| 36 | OpDecorate %arg_0 Binding 0 |
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 | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 41 | OpMemberDecorate %VertexOutput 0 Offset 0 |
| 42 | OpMemberDecorate %VertexOutput 1 Offset 16 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +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 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 48 | %int = OpTypeInt 32 1 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +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 1D 0 0 0 1 Unknown |
| 57 | %_ptr_UniformConstant_16 = OpTypePointer UniformConstant %16 |
| 58 | %arg_0 = OpVariable %_ptr_UniformConstant_16 UniformConstant |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +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 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 63 | %uint = OpTypeInt 32 0 |
| 64 | %uint_1 = OpConstant %uint 1 |
| 65 | %_ptr_Function_v4int = OpTypePointer Function %v4int |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 66 | %void = OpTypeVoid |
| 67 | %30 = OpTypeFunction %void |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 68 | %uint_0 = OpConstant %uint 0 |
| 69 | %_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 70 | %VertexOutput = OpTypeStruct %v4float %v4int |
| 71 | %42 = OpTypeFunction %VertexOutput |
| 72 | %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
| 73 | %48 = OpConstantNull %VertexOutput |
| 74 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 75 | %float_1 = OpConstant %float 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 76 | %textureLoad_0cb698 = OpFunction %v4int None %20 |
| 77 | %22 = OpLabel |
| 78 | %res = OpVariable %_ptr_Function_v4int Function %10 |
| 79 | %24 = OpLoad %16 %arg_0 |
| 80 | %23 = OpImageFetch %v4int %24 %uint_1 Lod %uint_1 |
| 81 | OpStore %res %23 |
| 82 | %29 = OpLoad %v4int %res |
| 83 | OpReturnValue %29 |
| 84 | OpFunctionEnd |
| 85 | %fragment_main = OpFunction %void None %30 |
| 86 | %33 = OpLabel |
| 87 | %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0 |
| 88 | %37 = OpFunctionCall %v4int %textureLoad_0cb698 |
| 89 | OpStore %36 %37 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 90 | OpReturn |
| 91 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 92 | %compute_main = OpFunction %void None %30 |
| 93 | %39 = OpLabel |
| 94 | %40 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0 |
| 95 | %41 = OpFunctionCall %v4int %textureLoad_0cb698 |
| 96 | OpStore %40 %41 |
| 97 | OpReturn |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 98 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 99 | %vertex_main_inner = OpFunction %VertexOutput None %42 |
| 100 | %45 = OpLabel |
| 101 | %out = OpVariable %_ptr_Function_VertexOutput Function %48 |
| 102 | %50 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| 103 | OpStore %50 %5 |
| 104 | %51 = OpAccessChain %_ptr_Function_v4int %out %uint_1 |
| 105 | %52 = OpFunctionCall %v4int %textureLoad_0cb698 |
| 106 | OpStore %51 %52 |
| 107 | %53 = OpLoad %VertexOutput %out |
| 108 | OpReturnValue %53 |
| 109 | OpFunctionEnd |
| 110 | %vertex_main = OpFunction %void None %30 |
| 111 | %55 = OpLabel |
| 112 | %56 = OpFunctionCall %VertexOutput %vertex_main_inner |
| 113 | %57 = OpCompositeExtract %v4float %56 0 |
| 114 | OpStore %pos_1 %57 |
| 115 | %58 = OpCompositeExtract %v4int %56 1 |
| 116 | OpStore %prevent_dce_1 %58 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 117 | OpStore %vertex_point_size %float_1 |
| 118 | OpReturn |
| 119 | OpFunctionEnd |