A removed block releases its instructions, so Module::idToInstruction suddenly contains dangling references. The original motivation for block removal was to skip some unreachable blocks, but that's already achieved by InReadableOrder.cpp. Also updated stale comments.
105 lines
4.7 KiB
Plaintext
Executable File
105 lines
4.7 KiB
Plaintext
Executable File
spv.forwardFun.frag
|
|
|
|
Linked fragment stage:
|
|
|
|
|
|
// Module Version 10000
|
|
// Generated by (magic number): 80001
|
|
// Id's are bound by 61
|
|
|
|
Capability Shader
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Fragment 4 "main" 20 30
|
|
ExecutionMode 4 OriginLowerLeft
|
|
Source ESSL 100
|
|
Name 4 "main"
|
|
Name 6 "bar("
|
|
Name 10 "unreachableReturn("
|
|
Name 16 "foo(vf4;"
|
|
Name 15 "bar"
|
|
Name 18 "color"
|
|
Name 20 "BaseColor"
|
|
Name 21 "param"
|
|
Name 27 "f"
|
|
Name 30 "gl_FragColor"
|
|
Name 36 "d"
|
|
Name 60 "bigColor"
|
|
Decorate 18(color) RelaxedPrecision
|
|
Decorate 20(BaseColor) RelaxedPrecision
|
|
Decorate 27(f) RelaxedPrecision
|
|
Decorate 30(gl_FragColor) RelaxedPrecision
|
|
Decorate 36(d) RelaxedPrecision
|
|
Decorate 60(bigColor) RelaxedPrecision
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
8: TypeFloat 32
|
|
9: TypeFunction 8(float)
|
|
12: TypeVector 8(float) 4
|
|
13: TypePointer Function 12(fvec4)
|
|
14: TypeFunction 8(float) 13(ptr)
|
|
19: TypePointer Input 12(fvec4)
|
|
20(BaseColor): 19(ptr) Variable Input
|
|
26: TypePointer Function 8(float)
|
|
29: TypePointer Output 12(fvec4)
|
|
30(gl_FragColor): 29(ptr) Variable Output
|
|
35: TypePointer UniformConstant 8(float)
|
|
36(d): 35(ptr) Variable UniformConstant
|
|
38: 8(float) Constant 1082549862
|
|
39: TypeBool
|
|
43: 8(float) Constant 1067030938
|
|
46: 8(float) Constant 1083179008
|
|
49: TypeInt 32 0
|
|
50: 49(int) Constant 0
|
|
53: 49(int) Constant 1
|
|
59: TypePointer UniformConstant 12(fvec4)
|
|
60(bigColor): 59(ptr) Variable UniformConstant
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
18(color): 13(ptr) Variable Function
|
|
21(param): 13(ptr) Variable Function
|
|
27(f): 26(ptr) Variable Function
|
|
22: 12(fvec4) Load 20(BaseColor)
|
|
Store 21(param) 22
|
|
23: 8(float) FunctionCall 16(foo(vf4;) 21(param)
|
|
24: 12(fvec4) CompositeConstruct 23 23 23 23
|
|
Store 18(color) 24
|
|
25: 2 FunctionCall 6(bar()
|
|
28: 8(float) FunctionCall 10(unreachableReturn()
|
|
Store 27(f) 28
|
|
31: 12(fvec4) Load 18(color)
|
|
32: 8(float) Load 27(f)
|
|
33: 12(fvec4) VectorTimesScalar 31 32
|
|
Store 30(gl_FragColor) 33
|
|
Return
|
|
FunctionEnd
|
|
6(bar(): 2 Function None 3
|
|
7: Label
|
|
Return
|
|
FunctionEnd
|
|
10(unreachableReturn(): 8(float) Function None 9
|
|
11: Label
|
|
34: 2 FunctionCall 6(bar()
|
|
37: 8(float) Load 36(d)
|
|
40: 39(bool) FOrdLessThan 37 38
|
|
SelectionMerge 42 None
|
|
BranchConditional 40 41 45
|
|
41: Label
|
|
ReturnValue 43
|
|
45: Label
|
|
ReturnValue 46
|
|
42: Label
|
|
48: 8(float) Undef
|
|
ReturnValue 48
|
|
FunctionEnd
|
|
16(foo(vf4;): 8(float) Function None 14
|
|
15(bar): 13(ptr) FunctionParameter
|
|
17: Label
|
|
51: 26(ptr) AccessChain 15(bar) 50
|
|
52: 8(float) Load 51
|
|
54: 26(ptr) AccessChain 15(bar) 53
|
|
55: 8(float) Load 54
|
|
56: 8(float) FAdd 52 55
|
|
ReturnValue 56
|
|
FunctionEnd
|