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: 59 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +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 | da5424b | 2022-10-24 23:58:53 +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 | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 15 | OpName %vertex_point_size "vertex_point_size" |
| 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 | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 20 | OpName %textureLoad_9ed19e "textureLoad_9ed19e" |
| 21 | OpName %res "res" |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +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 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 33 | OpDecorate %vertex_point_size BuiltIn PointSize |
| 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 | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 42 | %float = OpTypeFloat 32 |
| 43 | %v4float = OpTypeVector %float 4 |
| 44 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 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 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 47 | %_ptr_Output_float = OpTypePointer Output %float |
| 48 | %8 = OpConstantNull %float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 49 | %prevent_dce_1 = OpVariable %_ptr_Output_float Output %8 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 50 | %vertex_point_size = OpVariable %_ptr_Output_float Output %8 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 51 | %12 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| 52 | %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 |
| 53 | %arg_0 = OpVariable %_ptr_UniformConstant_12 UniformConstant |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 54 | %prevent_dce_block = OpTypeStruct %float |
| 55 | %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| 56 | %prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 57 | %16 = OpTypeFunction %float |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 58 | %uint = OpTypeInt 32 0 |
| 59 | %v2uint = OpTypeVector %uint 2 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 60 | %uint_1 = OpConstant %uint 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 61 | %25 = OpConstantComposite %v2uint %uint_1 %uint_1 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 62 | %_ptr_Function_float = OpTypePointer Function %float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 63 | %void = OpTypeVoid |
| 64 | %29 = OpTypeFunction %void |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 65 | %uint_0 = OpConstant %uint 0 |
| 66 | %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 67 | %VertexOutput = OpTypeStruct %v4float %float |
| 68 | %41 = OpTypeFunction %VertexOutput |
| 69 | %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
| 70 | %47 = OpConstantNull %VertexOutput |
| 71 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 72 | %float_1 = OpConstant %float 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 73 | %textureLoad_9ed19e = OpFunction %float None %16 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 74 | %18 = OpLabel |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 75 | %res = OpVariable %_ptr_Function_float Function %8 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 76 | %21 = OpLoad %12 %arg_0 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 77 | %20 = OpImageFetch %v4float %21 %25 Lod %uint_1 |
| 78 | %19 = OpCompositeExtract %float %20 0 |
| 79 | OpStore %res %19 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 80 | %28 = OpLoad %float %res |
| 81 | OpReturnValue %28 |
| 82 | OpFunctionEnd |
| 83 | %fragment_main = OpFunction %void None %29 |
| 84 | %32 = OpLabel |
| 85 | %35 = OpAccessChain %_ptr_StorageBuffer_float %prevent_dce %uint_0 |
| 86 | %36 = OpFunctionCall %float %textureLoad_9ed19e |
| 87 | OpStore %35 %36 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 88 | OpReturn |
| 89 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 90 | %compute_main = OpFunction %void None %29 |
| 91 | %38 = OpLabel |
| 92 | %39 = OpAccessChain %_ptr_StorageBuffer_float %prevent_dce %uint_0 |
| 93 | %40 = OpFunctionCall %float %textureLoad_9ed19e |
| 94 | OpStore %39 %40 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 95 | OpReturn |
| 96 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 97 | %vertex_main_inner = OpFunction %VertexOutput None %41 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 98 | %44 = OpLabel |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 99 | %out = OpVariable %_ptr_Function_VertexOutput Function %47 |
| 100 | %49 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| 101 | OpStore %49 %5 |
| 102 | %50 = OpAccessChain %_ptr_Function_float %out %uint_1 |
| 103 | %51 = OpFunctionCall %float %textureLoad_9ed19e |
| 104 | OpStore %50 %51 |
| 105 | %52 = OpLoad %VertexOutput %out |
| 106 | OpReturnValue %52 |
| 107 | OpFunctionEnd |
| 108 | %vertex_main = OpFunction %void None %29 |
| 109 | %54 = OpLabel |
| 110 | %55 = OpFunctionCall %VertexOutput %vertex_main_inner |
| 111 | %56 = OpCompositeExtract %v4float %55 0 |
| 112 | OpStore %pos_1 %56 |
| 113 | %57 = OpCompositeExtract %float %55 1 |
| 114 | OpStore %prevent_dce_1 %57 |
| 115 | OpStore %vertex_point_size %float_1 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 116 | OpReturn |
| 117 | OpFunctionEnd |