Debian Codegraph @

test/diff/diff_files/extra_if_block_src.spvasm

raw
1 ;; Test where src has an extra if block in one function, and dst has an extra
2 ;; if block in another function.
3 OpCapability Shader
4 %1 = OpExtInstImport "GLSL.std.450"
5 OpMemoryModel Logical GLSL450
6 OpEntryPoint Fragment %4 "main" %63 %68
7 OpExecutionMode %4 OriginUpperLeft
8 OpSource ESSL 310
9 OpName %4 "main"
10 OpName %8 "f1("
11 OpName %10 "f2("
12 OpName %13 "v"
13 OpName %16 "Buffer"
14 OpMemberName %16 0 "flag1"
15 OpMemberName %16 1 "flag2"
16 OpName %18 ""
17 OpName %45 "v"
18 OpName %63 "color"
19 OpName %68 "v"
20 OpDecorate %8 RelaxedPrecision
21 OpDecorate %10 RelaxedPrecision
22 OpDecorate %13 RelaxedPrecision
23 OpMemberDecorate %16 0 RelaxedPrecision
24 OpMemberDecorate %16 0 Offset 0
25 OpMemberDecorate %16 1 RelaxedPrecision
26 OpMemberDecorate %16 1 Offset 4
27 OpDecorate %16 Block
28 OpDecorate %18 DescriptorSet 0
29 OpDecorate %18 Binding 0
30 OpDecorate %23 RelaxedPrecision
31 OpDecorate %30 RelaxedPrecision
32 OpDecorate %31 RelaxedPrecision
33 OpDecorate %34 RelaxedPrecision
34 OpDecorate %35 RelaxedPrecision
35 OpDecorate %36 RelaxedPrecision
36 OpDecorate %37 RelaxedPrecision
37 OpDecorate %38 RelaxedPrecision
38 OpDecorate %39 RelaxedPrecision
39 OpDecorate %40 RelaxedPrecision
40 OpDecorate %41 RelaxedPrecision
41 OpDecorate %42 RelaxedPrecision
42 OpDecorate %45 RelaxedPrecision
43 OpDecorate %47 RelaxedPrecision
44 OpDecorate %48 RelaxedPrecision
45 OpDecorate %50 RelaxedPrecision
46 OpDecorate %51 RelaxedPrecision
47 OpDecorate %54 RelaxedPrecision
48 OpDecorate %55 RelaxedPrecision
49 OpDecorate %56 RelaxedPrecision
50 OpDecorate %57 RelaxedPrecision
51 OpDecorate %58 RelaxedPrecision
52 OpDecorate %63 RelaxedPrecision
53 OpDecorate %63 Location 0
54 OpDecorate %64 RelaxedPrecision
55 OpDecorate %65 RelaxedPrecision
56 OpDecorate %66 RelaxedPrecision
57 OpDecorate %68 RelaxedPrecision
58 OpDecorate %68 Location 0
59 %2 = OpTypeVoid
60 %3 = OpTypeFunction %2
61 %6 = OpTypeFloat 32
62 %7 = OpTypeFunction %6
63 %12 = OpTypePointer Function %6
64 %14 = OpConstant %6 0
65 %15 = OpTypeInt 32 0
66 %16 = OpTypeStruct %15 %15
67 %17 = OpTypePointer Uniform %16
68 %18 = OpVariable %17 Uniform
69 %19 = OpTypeInt 32 1
70 %20 = OpConstant %19 0
71 %21 = OpTypePointer Uniform %15
72 %24 = OpConstant %15 0
73 %25 = OpTypeBool
74 %29 = OpConstant %6 1
75 %32 = OpConstant %19 1
76 %49 = OpConstant %6 10
77 %52 = OpConstant %6 0.5
78 %53 = OpConstant %6 0.699999988
79 %61 = OpTypeVector %6 4
80 %62 = OpTypePointer Output %61
81 %63 = OpVariable %62 Output
82 %67 = OpTypePointer Input %6
83 %68 = OpVariable %67 Input
84 %4 = OpFunction %2 None %3
85 %5 = OpLabel
86 %64 = OpFunctionCall %6 %8
87 %65 = OpFunctionCall %6 %10
88 %66 = OpCompositeConstruct %61 %64 %65 %14 %29
89 OpStore %63 %66
90 OpReturn
91 OpFunctionEnd
92 %8 = OpFunction %6 None %7
93 %9 = OpLabel
94 %13 = OpVariable %12 Function
95 OpStore %13 %14
96 %22 = OpAccessChain %21 %18 %20
97 %23 = OpLoad %15 %22
98 %26 = OpINotEqual %25 %23 %24
99 OpSelectionMerge %28 None
100 OpBranchConditional %26 %27 %28
101 %27 = OpLabel
102 %30 = OpLoad %6 %13
103 %31 = OpFAdd %6 %30 %29
104 OpStore %13 %31
105 OpBranch %28
106 %28 = OpLabel
107 %33 = OpAccessChain %21 %18 %32
108 %34 = OpLoad %15 %33
109 %35 = OpConvertUToF %6 %34
110 %36 = OpExtInst %6 %1 Log2 %35
111 %37 = OpLoad %6 %13
112 %38 = OpFAdd %6 %37 %36
113 OpStore %13 %38
114 %39 = OpLoad %6 %13
115 %40 = OpLoad %6 %13
116 %41 = OpExtInst %6 %1 Sqrt %40
117 %42 = OpFSub %6 %39 %41
118 OpReturnValue %42
119 OpFunctionEnd
120 %10 = OpFunction %6 None %7
121 %11 = OpLabel
122 %45 = OpVariable %12 Function
123 %46 = OpAccessChain %21 %18 %20
124 %47 = OpLoad %15 %46
125 %48 = OpConvertUToF %6 %47
126 %50 = OpFDiv %6 %48 %49
127 OpStore %45 %50
128 %51 = OpLoad %6 %45
129 %54 = OpExtInst %6 %1 FClamp %51 %52 %53
130 %55 = OpLoad %6 %45
131 %56 = OpFMul %6 %55 %54
132 OpStore %45 %56
133 %57 = OpLoad %6 %45
134 %58 = OpExtInst %6 %1 Exp %57
135 OpReturnValue %58
136 OpFunctionEnd
137