Don't remove SPIR-V blocks before codegen.
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.
This commit is contained in:
@@ -5,7 +5,7 @@ Linked fragment stage:
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 100
|
||||
// Id's are bound by 101
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
@@ -23,40 +23,40 @@ Linked fragment stage:
|
||||
Name 43 "k"
|
||||
Name 55 "sampR"
|
||||
Name 63 "sampB"
|
||||
Name 86 "samp2Da"
|
||||
Name 91 "bn"
|
||||
MemberName 91(bn) 0 "matra"
|
||||
MemberName 91(bn) 1 "matca"
|
||||
MemberName 91(bn) 2 "matr"
|
||||
MemberName 91(bn) 3 "matc"
|
||||
MemberName 91(bn) 4 "matrdef"
|
||||
Name 93 ""
|
||||
Name 96 "bi"
|
||||
MemberName 96(bi) 0 "v"
|
||||
Name 99 "bname"
|
||||
Name 87 "samp2Da"
|
||||
Name 92 "bn"
|
||||
MemberName 92(bn) 0 "matra"
|
||||
MemberName 92(bn) 1 "matca"
|
||||
MemberName 92(bn) 2 "matr"
|
||||
MemberName 92(bn) 3 "matc"
|
||||
MemberName 92(bn) 4 "matrdef"
|
||||
Name 94 ""
|
||||
Name 97 "bi"
|
||||
MemberName 97(bi) 0 "v"
|
||||
Name 100 "bname"
|
||||
Decorate 16(gl_FrontFacing) BuiltIn FrontFacing
|
||||
Decorate 33(gl_ClipDistance) BuiltIn ClipDistance
|
||||
Decorate 89 ArrayStride 64
|
||||
Decorate 90 ArrayStride 64
|
||||
MemberDecorate 91(bn) 0 RowMajor
|
||||
MemberDecorate 91(bn) 0 Offset 0
|
||||
MemberDecorate 91(bn) 0 MatrixStride 16
|
||||
MemberDecorate 91(bn) 1 ColMajor
|
||||
MemberDecorate 91(bn) 1 Offset 256
|
||||
MemberDecorate 91(bn) 1 MatrixStride 16
|
||||
MemberDecorate 91(bn) 2 RowMajor
|
||||
MemberDecorate 91(bn) 2 Offset 512
|
||||
MemberDecorate 91(bn) 2 MatrixStride 16
|
||||
MemberDecorate 91(bn) 3 ColMajor
|
||||
MemberDecorate 91(bn) 3 Offset 576
|
||||
MemberDecorate 91(bn) 3 MatrixStride 16
|
||||
MemberDecorate 91(bn) 4 RowMajor
|
||||
MemberDecorate 91(bn) 4 Offset 640
|
||||
MemberDecorate 91(bn) 4 MatrixStride 16
|
||||
Decorate 91(bn) Block
|
||||
Decorate 95 ArrayStride 16
|
||||
MemberDecorate 96(bi) 0 Offset 0
|
||||
Decorate 96(bi) Block
|
||||
Decorate 91 ArrayStride 64
|
||||
MemberDecorate 92(bn) 0 RowMajor
|
||||
MemberDecorate 92(bn) 0 Offset 0
|
||||
MemberDecorate 92(bn) 0 MatrixStride 16
|
||||
MemberDecorate 92(bn) 1 ColMajor
|
||||
MemberDecorate 92(bn) 1 Offset 256
|
||||
MemberDecorate 92(bn) 1 MatrixStride 16
|
||||
MemberDecorate 92(bn) 2 RowMajor
|
||||
MemberDecorate 92(bn) 2 Offset 512
|
||||
MemberDecorate 92(bn) 2 MatrixStride 16
|
||||
MemberDecorate 92(bn) 3 ColMajor
|
||||
MemberDecorate 92(bn) 3 Offset 576
|
||||
MemberDecorate 92(bn) 3 MatrixStride 16
|
||||
MemberDecorate 92(bn) 4 RowMajor
|
||||
MemberDecorate 92(bn) 4 Offset 640
|
||||
MemberDecorate 92(bn) 4 MatrixStride 16
|
||||
Decorate 92(bn) Block
|
||||
Decorate 96 ArrayStride 16
|
||||
MemberDecorate 97(bi) 0 Offset 0
|
||||
Decorate 97(bi) Block
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -100,24 +100,24 @@ Linked fragment stage:
|
||||
69: TypeVector 6(float) 2
|
||||
72: 6(float) Constant 1120403456
|
||||
74: 29(int) Constant 3
|
||||
82: TypeImage 6(float) 2D sampled format:Unknown
|
||||
83: TypeSampledImage 82
|
||||
84: TypeArray 83 74
|
||||
85: TypePointer UniformConstant 84
|
||||
86(samp2Da): 85(ptr) Variable UniformConstant
|
||||
87: TypeMatrix 26(fvec4) 4
|
||||
88: 29(int) Constant 4
|
||||
89: TypeArray 87 88
|
||||
90: TypeArray 87 88
|
||||
91(bn): TypeStruct 89 90 87 87 87
|
||||
92: TypePointer Uniform 91(bn)
|
||||
93: 92(ptr) Variable Uniform
|
||||
94: TypeVector 6(float) 3
|
||||
95: TypeArray 94(fvec3) 50
|
||||
96(bi): TypeStruct 95
|
||||
97: TypeArray 96(bi) 88
|
||||
98: TypePointer Uniform 97
|
||||
99(bname): 98(ptr) Variable Uniform
|
||||
83: TypeImage 6(float) 2D sampled format:Unknown
|
||||
84: TypeSampledImage 83
|
||||
85: TypeArray 84 74
|
||||
86: TypePointer UniformConstant 85
|
||||
87(samp2Da): 86(ptr) Variable UniformConstant
|
||||
88: TypeMatrix 26(fvec4) 4
|
||||
89: 29(int) Constant 4
|
||||
90: TypeArray 88 89
|
||||
91: TypeArray 88 89
|
||||
92(bn): TypeStruct 90 91 88 88 88
|
||||
93: TypePointer Uniform 92(bn)
|
||||
94: 93(ptr) Variable Uniform
|
||||
95: TypeVector 6(float) 3
|
||||
96: TypeArray 95(fvec3) 50
|
||||
97(bi): TypeStruct 96
|
||||
98: TypeArray 97(bi) 89
|
||||
99: TypePointer Uniform 98
|
||||
100(bname): 99(ptr) Variable Uniform
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
13: 12(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user