Debian Codegraph @

third_party/spirv-cross/shaders/asm/comp/switch-break-ladder.asm.comp

raw
1 ; SPIR-V
2 ; Version: 1.0
3 ; Generator: Khronos Glslang Reference Front End; 6
4 ; Bound: 50
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 %BUF "BUF"
15 OpMemberName %BUF 0 "a"
16 OpMemberName %BUF 1 "b"
17 OpMemberName %BUF 2 "d"
18 OpName %o "o"
19 OpName %a "a"
20 OpMemberDecorate %BUF 0 Offset 0
21 OpMemberDecorate %BUF 1 Offset 4
22 OpMemberDecorate %BUF 2 Offset 8
23 OpDecorate %BUF BufferBlock
24 OpDecorate %o DescriptorSet 0
25 OpDecorate %o Binding 0
26 %void = OpTypeVoid
27 %3 = OpTypeFunction %void
28 %int = OpTypeInt 32 1
29 %_ptr_Function_int = OpTypePointer Function %int
30 %BUF = OpTypeStruct %int %int %int
31 %_ptr_Uniform_BUF = OpTypePointer Uniform %BUF
32 %o = OpVariable %_ptr_Uniform_BUF Uniform
33 %int_0 = OpConstant %int 0
34 %_ptr_Uniform_int = OpTypePointer Uniform %int
35 %int_2 = OpConstant %int 2
36 %int_1 = OpConstant %int 1
37 %main = OpFunction %void None %3
38 %5 = OpLabel
39 %c = OpVariable %_ptr_Function_int Function
40 %a = OpVariable %_ptr_Function_int Function
41 %14 = OpAccessChain %_ptr_Uniform_int %o %int_0
42 %15 = OpLoad %int %14
43 OpStore %c %15
44 OpBranch %16
45 %16 = OpLabel
46 OpLoopMerge %18 %19 None
47 OpBranch %17
48 %17 = OpLabel
49 %20 = OpLoad %int %c
50 OpSelectionMerge %23 None
51 OpSwitch %20 %23 5 %21 1 %22 2 %22 3 %22
52 %21 = OpLabel
53 OpBranch %24
54 %24 = OpLabel
55 OpLoopMerge %26 %27 None
56 OpBranch %25
57 %25 = OpLabel
58 %29 = OpAccessChain %_ptr_Uniform_int %o %int_2
59 %30 = OpLoad %int %29
60 OpSelectionMerge %33 None
61 OpSwitch %30 %32 10 %31 20 %31
62 %32 = OpLabel
63 OpBranch %27
64 %31 = OpLabel
65 %34 = OpLoad %int %c
66 %35 = OpLoad %int %c
67 %36 = OpIAdd %int %35 %34
68 OpStore %c %36
69 OpBranch %26
70 %33 = OpLabel
71 OpUnreachable
72 %27 = OpLabel
73 OpBranch %24
74 %26 = OpLabel
75 OpBranch %23
76 %22 = OpLabel
77 %42 = OpLoad %int %c
78 OpStore %a %42
79 OpBranch %18
80 %23 = OpLabel
81 %45 = OpLoad %int %c
82 %47 = OpIAdd %int %45 %int_1
83 OpStore %c %47
84 OpBranch %19
85 %19 = OpLabel
86 OpBranch %16
87 %18 = OpLabel
88 %48 = OpLoad %int %a
89 %49 = OpAccessChain %_ptr_Uniform_int %o %int_1
90 OpStore %49 %48
91 OpReturn
92 OpFunctionEnd