Debian Codegraph @

third_party/spirv-cross/shaders-msl-no-opt/asm/comp/storage-buffer-basic.invalid.asm.comp

raw
1 ; SPIR-V
2 ; Version: 1.0
3 ; Generator: Codeplay; 0
4 ; Bound: 31
5 ; Schema: 0
6 OpCapability Shader
7 OpCapability VariablePointers
8 OpExtension "SPV_KHR_storage_buffer_storage_class"
9 OpExtension "SPV_KHR_variable_pointers"
10 OpMemoryModel Logical GLSL450
11 OpEntryPoint GLCompute %22 "main" %gl_WorkGroupID
12 OpSource OpenCL_C 120
13 OpDecorate %15 SpecId 0
14 ;OpDecorate %16 SpecId 1
15 OpDecorate %17 SpecId 2
16 OpDecorate %_runtimearr_float ArrayStride 4
17 OpMemberDecorate %_struct_4 0 Offset 0
18 OpDecorate %_struct_4 Block
19 OpDecorate %gl_WorkGroupID BuiltIn WorkgroupId
20 OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
21 OpDecorate %20 DescriptorSet 0
22 OpDecorate %20 Binding 0
23 OpDecorate %21 DescriptorSet 0
24 OpDecorate %21 Binding 1
25 %float = OpTypeFloat 32
26 %uint = OpTypeInt 32 0
27 %size1 = OpConstant %uint 1
28 %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
29 %_runtimearr_float = OpTypeArray %float %size1 ; Runtime arrays do not work yet in MSL.
30 %_struct_4 = OpTypeStruct %_runtimearr_float
31 %_ptr_StorageBuffer__struct_4 = OpTypePointer StorageBuffer %_struct_4
32 %void = OpTypeVoid
33 %8 = OpTypeFunction %void
34 %v3uint = OpTypeVector %uint 3
35 %_ptr_Input_v3uint = OpTypePointer Input %v3uint
36 %_ptr_Input_uint = OpTypePointer Input %uint
37 %_ptr_Private_v3uint = OpTypePointer Private %v3uint
38 %uint_0 = OpConstant %uint 0
39 %gl_WorkGroupID = OpVariable %_ptr_Input_v3uint Input
40 %15 = OpSpecConstant %uint 1
41 %16 = OpConstant %uint 2
42 %17 = OpSpecConstant %uint 3
43 %gl_WorkGroupSize = OpSpecConstantComposite %v3uint %15 %16 %17
44 %19 = OpVariable %_ptr_Private_v3uint Private %gl_WorkGroupSize
45 %20 = OpVariable %_ptr_StorageBuffer__struct_4 StorageBuffer
46 %21 = OpVariable %_ptr_StorageBuffer__struct_4 StorageBuffer
47 %22 = OpFunction %void None %8
48 %23 = OpLabel
49 %24 = OpAccessChain %_ptr_Input_uint %gl_WorkGroupID %uint_0
50 %25 = OpLoad %uint %24
51 %26 = OpAccessChain %_ptr_StorageBuffer_float %21 %uint_0 %25
52 %27 = OpLoad %float %26
53 %28 = OpAccessChain %_ptr_StorageBuffer_float %20 %uint_0 %25
54 %29 = OpLoad %float %28
55 %30 = OpFAdd %float %27 %29
56 OpStore %28 %30
57 OpReturn
58 OpFunctionEnd