Debian Codegraph @

third_party/spirv-cross/shaders-hlsl-no-opt/asm/comp/atomic-load-store.asm.comp

raw
1 ; SPIR-V
2 ; Version: 1.0
3 ; Generator: Khronos Glslang Reference Front End; 8
4 ; Bound: 23
5 ; Schema: 0
6 OpCapability Shader
7 %1 = OpExtInstImport "GLSL.std.450"
8 OpMemoryModel Logical GLSL450
9 OpEntryPoint GLCompute %main "main"
10 OpExecutionMode %main LocalSize 1 1 1
11 OpSource GLSL 450
12 OpName %main "main"
13 OpName %c "c"
14 OpName %SSBO "SSBO"
15 OpMemberName %SSBO 0 "a"
16 OpMemberName %SSBO 1 "b"
17 OpName %_ ""
18 OpMemberDecorate %SSBO 0 Offset 0
19 OpMemberDecorate %SSBO 1 Offset 4
20 OpDecorate %SSBO BufferBlock
21 OpDecorate %_ DescriptorSet 0
22 OpDecorate %_ Binding 0
23 OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
24 %void = OpTypeVoid
25 %3 = OpTypeFunction %void
26 %uint = OpTypeInt 32 0
27 %_ptr_Function_uint = OpTypePointer Function %uint
28 %SSBO = OpTypeStruct %uint %uint
29 %_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO
30 %_ = OpVariable %_ptr_Uniform_SSBO Uniform
31 %int = OpTypeInt 32 1
32 %int_1 = OpConstant %int 1
33 %_ptr_Uniform_uint = OpTypePointer Uniform %uint
34 %int_0 = OpConstant %int 0
35 %v3uint = OpTypeVector %uint 3
36 %uint_1 = OpConstant %uint 1
37 %gl_WorkGroupSize = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
38 %main = OpFunction %void None %3
39 %5 = OpLabel
40 %c = OpVariable %_ptr_Function_uint Function
41 %15 = OpAccessChain %_ptr_Uniform_uint %_ %int_1
42 %16 = OpAtomicLoad %uint %15 %int_1 %int_0
43 OpStore %c %16
44 %18 = OpLoad %uint %c
45 %19 = OpAccessChain %_ptr_Uniform_uint %_ %int_0
46 OpAtomicStore %19 %int_1 %int_0 %18
47 OpReturn
48 OpFunctionEnd