dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 1 |
| 4 | ; Bound: 30 |
| 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpCapability ImageQuery |
| 8 | OpMemoryModel Logical GLSL450 |
| 9 | OpEntryPoint Fragment %fragment_main "fragment_main" |
| 10 | OpEntryPoint GLCompute %compute_main "compute_main" |
| 11 | OpExecutionMode %fragment_main OriginUpperLeft |
| 12 | OpExecutionMode %compute_main LocalSize 1 1 1 |
| 13 | OpMemberName %tint_symbol_1 0 "tint_symbol" |
| 14 | OpName %tint_symbol_1 "tint_symbol_1" |
| 15 | OpName %arg_0 "arg_0" |
| 16 | OpName %textureNumLayers_2a48dc "textureNumLayers_2a48dc" |
| 17 | OpName %res "res" |
| 18 | OpName %fragment_main "fragment_main" |
| 19 | OpName %compute_main "compute_main" |
| 20 | OpMemberDecorate %tint_symbol_1 0 Offset 0 |
| 21 | OpDecorate %tint_symbol_1 Block |
| 22 | OpDecorate %1 DescriptorSet 0 |
| 23 | OpDecorate %1 Binding 0 |
| 24 | OpDecorate %arg_0 DescriptorSet 1 |
| 25 | OpDecorate %arg_0 Binding 0 |
| 26 | %uint = OpTypeInt 32 0 |
| 27 | %tint_symbol_1 = OpTypeStruct %uint |
| 28 | %_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1 |
| 29 | %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer |
| 30 | %7 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui |
| 31 | %_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7 |
| 32 | %arg_0 = OpVariable %_ptr_UniformConstant_7 UniformConstant |
| 33 | %9 = OpTypeFunction %uint |
| 34 | %v3uint = OpTypeVector %uint 3 |
| 35 | %_ptr_Function_uint = OpTypePointer Function %uint |
| 36 | %void = OpTypeVoid |
| 37 | %20 = OpTypeFunction %void |
| 38 | %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| 39 | %uint_0 = OpConstant %uint 0 |
| 40 | %textureNumLayers_2a48dc = OpFunction %uint None %9 |
| 41 | %10 = OpLabel |
| 42 | %res = OpVariable %_ptr_Function_uint Function |
| 43 | %11 = OpLoad %7 %arg_0 |
| 44 | %12 = OpImageQuerySize %v3uint %11 |
| 45 | %14 = OpCompositeExtract %uint %12 2 |
| 46 | OpStore %res %14 |
| 47 | %17 = OpLoad %uint %res |
| 48 | OpReturnValue %17 |
| 49 | OpFunctionEnd |
| 50 | %fragment_main = OpFunction %void None %20 |
| 51 | %21 = OpLabel |
| 52 | %22 = OpFunctionCall %uint %textureNumLayers_2a48dc |
| 53 | %23 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 |
| 54 | OpStore %23 %22 |
| 55 | OpReturn |
| 56 | OpFunctionEnd |
| 57 | %compute_main = OpFunction %void None %20 |
| 58 | %27 = OpLabel |
| 59 | %28 = OpFunctionCall %uint %textureNumLayers_2a48dc |
| 60 | %29 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 |
| 61 | OpStore %29 %28 |
| 62 | OpReturn |
| 63 | OpFunctionEnd |