SPIRV: Simplify matrix->matrix constructor
When constructing a matrix from another matrix with smaller dimensions, there's no need to extract the scalars out of columns and rebuild the resulting matrix from scalars - instead, we can just construct shorter vectors with OpShuffle and combine them to the final result. This keeps the common casts such as mat3(mat4) in vector registers, which may improve performance for some GPUs, and cleans up output of translation tools like SPIRV-Cross. Fixes #1412.
This commit is contained in:
parent
cd57b4ba0f
commit
112e2858cf
@ -2031,6 +2031,35 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
|
|||||||
Instruction* instr = module.getInstruction(componentTypeId);
|
Instruction* instr = module.getInstruction(componentTypeId);
|
||||||
Id bitCount = instr->getIdOperand(0);
|
Id bitCount = instr->getIdOperand(0);
|
||||||
|
|
||||||
|
if (isMatrix(sources[0]) && getNumColumns(sources[0]) >= numCols && getNumRows(sources[0]) >= numRows) {
|
||||||
|
// To truncate the matrix to a smaller number of rows/columns, we need to:
|
||||||
|
// 1. For each column, extract the column and truncate it to the required size using shuffle
|
||||||
|
// 2. Assemble the resulting matrix from all columns
|
||||||
|
Id matrix = sources[0];
|
||||||
|
Id columnTypeId = getContainedTypeId(resultTypeId);
|
||||||
|
Id sourceColumnTypeId = getContainedTypeId(getTypeId(matrix));
|
||||||
|
|
||||||
|
std::vector<unsigned> channels;
|
||||||
|
for (int row = 0; row < numRows; ++row) {
|
||||||
|
channels.push_back(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<Id> matrixColumns;
|
||||||
|
for (int col = 0; col < numCols; ++col) {
|
||||||
|
std::vector<unsigned> indexes;
|
||||||
|
indexes.push_back(col);
|
||||||
|
Id colv = createCompositeExtract(matrix, sourceColumnTypeId, indexes);
|
||||||
|
setPrecision(colv, precision);
|
||||||
|
|
||||||
|
if (numRows != getNumRows(matrix)) {
|
||||||
|
matrixColumns.push_back(createRvalueSwizzle(precision, columnTypeId, colv, channels));
|
||||||
|
} else {
|
||||||
|
matrixColumns.push_back(colv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return setPrecision(createCompositeConstruct(resultTypeId, matrixColumns), precision);
|
||||||
|
} else {
|
||||||
// Will use a two step process
|
// Will use a two step process
|
||||||
// 1. make a compile-time 2D array of values
|
// 1. make a compile-time 2D array of values
|
||||||
// 2. construct a matrix from that array
|
// 2. construct a matrix from that array
|
||||||
@ -2108,6 +2137,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
|
|||||||
|
|
||||||
// make the matrix
|
// make the matrix
|
||||||
return setPrecision(createCompositeConstruct(resultTypeId, matrixColumns), precision);
|
return setPrecision(createCompositeConstruct(resultTypeId, matrixColumns), precision);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comments in header
|
// Comments in header
|
||||||
|
@ -251,12 +251,12 @@ Shader version: 500
|
|||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80007
|
||||||
// Id's are bound by 106
|
// Id's are bound by 93
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Vertex 4 "main" 87 91 99 103
|
EntryPoint Vertex 4 "main" 74 78 86 90
|
||||||
Source HLSL 500
|
Source HLSL 500
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
Name 9 "VS_INPUT"
|
Name 9 "VS_INPUT"
|
||||||
@ -274,13 +274,13 @@ Shader version: 500
|
|||||||
MemberName 28(C) 1 "View"
|
MemberName 28(C) 1 "View"
|
||||||
MemberName 28(C) 2 "Projection"
|
MemberName 28(C) 2 "Projection"
|
||||||
Name 30 ""
|
Name 30 ""
|
||||||
Name 85 "input"
|
Name 72 "input"
|
||||||
Name 87 "input.Pos"
|
Name 74 "input.Pos"
|
||||||
Name 91 "input.Norm"
|
Name 78 "input.Norm"
|
||||||
Name 94 "flattenTemp"
|
Name 81 "flattenTemp"
|
||||||
Name 95 "param"
|
Name 82 "param"
|
||||||
Name 99 "@entryPointOutput.Pos"
|
Name 86 "@entryPointOutput.Pos"
|
||||||
Name 103 "@entryPointOutput.Norm"
|
Name 90 "@entryPointOutput.Norm"
|
||||||
MemberDecorate 28(C) 0 RowMajor
|
MemberDecorate 28(C) 0 RowMajor
|
||||||
MemberDecorate 28(C) 0 Offset 0
|
MemberDecorate 28(C) 0 Offset 0
|
||||||
MemberDecorate 28(C) 0 MatrixStride 16
|
MemberDecorate 28(C) 0 MatrixStride 16
|
||||||
@ -293,10 +293,10 @@ Shader version: 500
|
|||||||
Decorate 28(C) Block
|
Decorate 28(C) Block
|
||||||
Decorate 30 DescriptorSet 0
|
Decorate 30 DescriptorSet 0
|
||||||
Decorate 30 Binding 0
|
Decorate 30 Binding 0
|
||||||
Decorate 87(input.Pos) Location 0
|
Decorate 74(input.Pos) Location 0
|
||||||
Decorate 91(input.Norm) Location 1
|
Decorate 78(input.Norm) Location 1
|
||||||
Decorate 99(@entryPointOutput.Pos) BuiltIn Position
|
Decorate 86(@entryPointOutput.Pos) BuiltIn Position
|
||||||
Decorate 103(@entryPointOutput.Norm) Location 0
|
Decorate 90(@entryPointOutput.Norm) Location 0
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
@ -324,37 +324,36 @@ Shader version: 500
|
|||||||
39: 16(int) Constant 1
|
39: 16(int) Constant 1
|
||||||
46: 16(int) Constant 2
|
46: 16(int) Constant 2
|
||||||
55: TypeMatrix 7(fvec4) 3
|
55: TypeMatrix 7(fvec4) 3
|
||||||
56: 6(float) Constant 1065353216
|
60: TypePointer Function 8(fvec3)
|
||||||
73: TypePointer Function 8(fvec3)
|
73: TypePointer Input 7(fvec4)
|
||||||
86: TypePointer Input 7(fvec4)
|
74(input.Pos): 73(ptr) Variable Input
|
||||||
87(input.Pos): 86(ptr) Variable Input
|
77: TypePointer Input 8(fvec3)
|
||||||
90: TypePointer Input 8(fvec3)
|
78(input.Norm): 77(ptr) Variable Input
|
||||||
91(input.Norm): 90(ptr) Variable Input
|
85: TypePointer Output 7(fvec4)
|
||||||
98: TypePointer Output 7(fvec4)
|
86(@entryPointOutput.Pos): 85(ptr) Variable Output
|
||||||
99(@entryPointOutput.Pos): 98(ptr) Variable Output
|
89: TypePointer Output 8(fvec3)
|
||||||
102: TypePointer Output 8(fvec3)
|
90(@entryPointOutput.Norm): 89(ptr) Variable Output
|
||||||
103(@entryPointOutput.Norm): 102(ptr) Variable Output
|
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
85(input): 10(ptr) Variable Function
|
72(input): 10(ptr) Variable Function
|
||||||
94(flattenTemp): 20(ptr) Variable Function
|
81(flattenTemp): 20(ptr) Variable Function
|
||||||
95(param): 10(ptr) Variable Function
|
82(param): 10(ptr) Variable Function
|
||||||
88: 7(fvec4) Load 87(input.Pos)
|
75: 7(fvec4) Load 74(input.Pos)
|
||||||
89: 34(ptr) AccessChain 85(input) 26
|
76: 34(ptr) AccessChain 72(input) 26
|
||||||
Store 89 88
|
Store 76 75
|
||||||
92: 8(fvec3) Load 91(input.Norm)
|
79: 8(fvec3) Load 78(input.Norm)
|
||||||
93: 73(ptr) AccessChain 85(input) 39
|
80: 60(ptr) AccessChain 72(input) 39
|
||||||
Store 93 92
|
Store 80 79
|
||||||
96: 9(VS_INPUT) Load 85(input)
|
83: 9(VS_INPUT) Load 72(input)
|
||||||
Store 95(param) 96
|
Store 82(param) 83
|
||||||
97:11(PS_INPUT) FunctionCall 14(@main(struct-VS_INPUT-vf4-vf31;) 95(param)
|
84:11(PS_INPUT) FunctionCall 14(@main(struct-VS_INPUT-vf4-vf31;) 82(param)
|
||||||
Store 94(flattenTemp) 97
|
Store 81(flattenTemp) 84
|
||||||
100: 34(ptr) AccessChain 94(flattenTemp) 26
|
87: 34(ptr) AccessChain 81(flattenTemp) 26
|
||||||
101: 7(fvec4) Load 100
|
88: 7(fvec4) Load 87
|
||||||
Store 99(@entryPointOutput.Pos) 101
|
Store 86(@entryPointOutput.Pos) 88
|
||||||
104: 73(ptr) AccessChain 94(flattenTemp) 39
|
91: 60(ptr) AccessChain 81(flattenTemp) 39
|
||||||
105: 8(fvec3) Load 104
|
92: 8(fvec3) Load 91
|
||||||
Store 103(@entryPointOutput.Norm) 105
|
Store 90(@entryPointOutput.Norm) 92
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
14(@main(struct-VS_INPUT-vf4-vf31;):11(PS_INPUT) Function None 12
|
14(@main(struct-VS_INPUT-vf4-vf31;):11(PS_INPUT) Function None 12
|
||||||
@ -387,31 +386,19 @@ Shader version: 500
|
|||||||
Store 52 51
|
Store 52 51
|
||||||
53: 31(ptr) AccessChain 30 26
|
53: 31(ptr) AccessChain 30 26
|
||||||
54: 27 Load 53
|
54: 27 Load 53
|
||||||
57: 6(float) CompositeExtract 54 0 0
|
56: 7(fvec4) CompositeExtract 54 0
|
||||||
58: 6(float) CompositeExtract 54 0 1
|
57: 7(fvec4) CompositeExtract 54 1
|
||||||
59: 6(float) CompositeExtract 54 0 2
|
58: 7(fvec4) CompositeExtract 54 2
|
||||||
60: 6(float) CompositeExtract 54 0 3
|
59: 55 CompositeConstruct 56 57 58
|
||||||
61: 6(float) CompositeExtract 54 1 0
|
61: 60(ptr) AccessChain 13(input) 39
|
||||||
62: 6(float) CompositeExtract 54 1 1
|
62: 8(fvec3) Load 61
|
||||||
63: 6(float) CompositeExtract 54 1 2
|
63: 7(fvec4) MatrixTimesVector 59 62
|
||||||
64: 6(float) CompositeExtract 54 1 3
|
64: 6(float) CompositeExtract 63 0
|
||||||
65: 6(float) CompositeExtract 54 2 0
|
65: 6(float) CompositeExtract 63 1
|
||||||
66: 6(float) CompositeExtract 54 2 1
|
66: 6(float) CompositeExtract 63 2
|
||||||
67: 6(float) CompositeExtract 54 2 2
|
67: 8(fvec3) CompositeConstruct 64 65 66
|
||||||
68: 6(float) CompositeExtract 54 2 3
|
68: 60(ptr) AccessChain 21(output) 39
|
||||||
69: 7(fvec4) CompositeConstruct 57 58 59 60
|
Store 68 67
|
||||||
70: 7(fvec4) CompositeConstruct 61 62 63 64
|
69:11(PS_INPUT) Load 21(output)
|
||||||
71: 7(fvec4) CompositeConstruct 65 66 67 68
|
ReturnValue 69
|
||||||
72: 55 CompositeConstruct 69 70 71
|
|
||||||
74: 73(ptr) AccessChain 13(input) 39
|
|
||||||
75: 8(fvec3) Load 74
|
|
||||||
76: 7(fvec4) MatrixTimesVector 72 75
|
|
||||||
77: 6(float) CompositeExtract 76 0
|
|
||||||
78: 6(float) CompositeExtract 76 1
|
|
||||||
79: 6(float) CompositeExtract 76 2
|
|
||||||
80: 8(fvec3) CompositeConstruct 77 78 79
|
|
||||||
81: 73(ptr) AccessChain 21(output) 39
|
|
||||||
Store 81 80
|
|
||||||
82:11(PS_INPUT) Load 21(output)
|
|
||||||
ReturnValue 82
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -384,12 +384,12 @@ gl_FragCoord origin is upper left
|
|||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80007
|
||||||
// Id's are bound by 231
|
// Id's are bound by 190
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 229
|
EntryPoint Fragment 4 "main" 188
|
||||||
ExecutionMode 4 OriginUpperLeft
|
ExecutionMode 4 OriginUpperLeft
|
||||||
Source HLSL 500
|
Source HLSL 500
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
@ -408,14 +408,14 @@ gl_FragCoord origin is upper left
|
|||||||
Name 23 ""
|
Name 23 ""
|
||||||
Name 37 "r01"
|
Name 37 "r01"
|
||||||
Name 49 "r10"
|
Name 49 "r10"
|
||||||
Name 75 "r11"
|
Name 61 "r11"
|
||||||
Name 87 "r20"
|
Name 73 "r20"
|
||||||
Name 110 "r21"
|
Name 88 "r21"
|
||||||
Name 124 "r30"
|
Name 102 "r30"
|
||||||
Name 144 "r31"
|
Name 118 "r31"
|
||||||
Name 162 "r32"
|
Name 133 "r32"
|
||||||
Name 181 "r33"
|
Name 146 "r33"
|
||||||
Name 229 "@entryPointOutput"
|
Name 188 "@entryPointOutput"
|
||||||
MemberDecorate 21(Matrix) 0 RowMajor
|
MemberDecorate 21(Matrix) 0 RowMajor
|
||||||
MemberDecorate 21(Matrix) 0 Offset 0
|
MemberDecorate 21(Matrix) 0 Offset 0
|
||||||
MemberDecorate 21(Matrix) 0 MatrixStride 16
|
MemberDecorate 21(Matrix) 0 MatrixStride 16
|
||||||
@ -439,7 +439,7 @@ gl_FragCoord origin is upper left
|
|||||||
MemberDecorate 21(Matrix) 8 Offset 352
|
MemberDecorate 21(Matrix) 8 Offset 352
|
||||||
Decorate 21(Matrix) Block
|
Decorate 21(Matrix) Block
|
||||||
Decorate 23 DescriptorSet 0
|
Decorate 23 DescriptorSet 0
|
||||||
Decorate 229(@entryPointOutput) Location 0
|
Decorate 188(@entryPointOutput) Location 0
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
@ -467,32 +467,30 @@ gl_FragCoord origin is upper left
|
|||||||
48: TypePointer Function 7(fvec4)
|
48: TypePointer Function 7(fvec4)
|
||||||
50: 24(int) Constant 0
|
50: 24(int) Constant 0
|
||||||
51: TypePointer Uniform 13
|
51: TypePointer Uniform 13
|
||||||
54: 6(float) Constant 1065353216
|
62: 24(int) Constant 2
|
||||||
55: 6(float) Constant 0
|
63: TypePointer Uniform 16
|
||||||
76: 24(int) Constant 2
|
95: 24(int) Constant 1
|
||||||
77: TypePointer Uniform 16
|
96: TypePointer Uniform 15
|
||||||
117: 24(int) Constant 1
|
100: TypeMatrix 14(fvec3) 2
|
||||||
118: TypePointer Uniform 15
|
101: TypePointer Function 100
|
||||||
122: TypeMatrix 14(fvec3) 2
|
103: 24(int) Constant 3
|
||||||
123: TypePointer Function 122
|
104: TypePointer Uniform 17
|
||||||
125: 24(int) Constant 3
|
107: 24(int) Constant 4
|
||||||
126: TypePointer Uniform 17
|
108: TypePointer Uniform 18
|
||||||
129: 24(int) Constant 4
|
117: TypePointer Function 16
|
||||||
130: TypePointer Uniform 18
|
123: TypeMatrix 19(fvec2) 3
|
||||||
143: TypePointer Function 16
|
132: TypePointer Function 123
|
||||||
149: TypeMatrix 19(fvec2) 3
|
134: 24(int) Constant 5
|
||||||
161: TypePointer Function 149
|
135: TypePointer Uniform 20
|
||||||
163: 24(int) Constant 5
|
145: TypePointer Function 15
|
||||||
164: TypePointer Uniform 20
|
168: TypeInt 32 0
|
||||||
180: TypePointer Function 15
|
169: 168(int) Constant 0
|
||||||
209: TypeInt 32 0
|
187: TypePointer Output 7(fvec4)
|
||||||
210: 209(int) Constant 0
|
188(@entryPointOutput): 187(ptr) Variable Output
|
||||||
228: TypePointer Output 7(fvec4)
|
|
||||||
229(@entryPointOutput): 228(ptr) Variable Output
|
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
230: 7(fvec4) FunctionCall 9(@main()
|
189: 7(fvec4) FunctionCall 9(@main()
|
||||||
Store 229(@entryPointOutput) 230
|
Store 188(@entryPointOutput) 189
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
9(@main(): 7(fvec4) Function None 8
|
9(@main(): 7(fvec4) Function None 8
|
||||||
@ -500,13 +498,13 @@ gl_FragCoord origin is upper left
|
|||||||
12(r00): 11(ptr) Variable Function
|
12(r00): 11(ptr) Variable Function
|
||||||
37(r01): 11(ptr) Variable Function
|
37(r01): 11(ptr) Variable Function
|
||||||
49(r10): 48(ptr) Variable Function
|
49(r10): 48(ptr) Variable Function
|
||||||
75(r11): 48(ptr) Variable Function
|
61(r11): 48(ptr) Variable Function
|
||||||
87(r20): 48(ptr) Variable Function
|
73(r20): 48(ptr) Variable Function
|
||||||
110(r21): 48(ptr) Variable Function
|
88(r21): 48(ptr) Variable Function
|
||||||
124(r30): 123(ptr) Variable Function
|
102(r30): 101(ptr) Variable Function
|
||||||
144(r31): 143(ptr) Variable Function
|
118(r31): 117(ptr) Variable Function
|
||||||
162(r32): 161(ptr) Variable Function
|
133(r32): 132(ptr) Variable Function
|
||||||
181(r33): 180(ptr) Variable Function
|
146(r33): 145(ptr) Variable Function
|
||||||
27: 26(ptr) AccessChain 23 25
|
27: 26(ptr) AccessChain 23 25
|
||||||
28: 19(fvec2) Load 27
|
28: 19(fvec2) Load 27
|
||||||
31: 30(ptr) AccessChain 23 29
|
31: 30(ptr) AccessChain 23 29
|
||||||
@ -527,158 +525,119 @@ gl_FragCoord origin is upper left
|
|||||||
Store 37(r01) 47
|
Store 37(r01) 47
|
||||||
52: 51(ptr) AccessChain 23 50
|
52: 51(ptr) AccessChain 23 50
|
||||||
53: 13 Load 52
|
53: 13 Load 52
|
||||||
56: 6(float) CompositeExtract 53 0 0
|
54: 7(fvec4) CompositeExtract 53 0
|
||||||
57: 6(float) CompositeExtract 53 0 1
|
55: 7(fvec4) CompositeExtract 53 1
|
||||||
58: 6(float) CompositeExtract 53 0 2
|
56: 7(fvec4) CompositeExtract 53 2
|
||||||
59: 6(float) CompositeExtract 53 0 3
|
57: 16 CompositeConstruct 54 55 56
|
||||||
60: 6(float) CompositeExtract 53 1 0
|
58: 30(ptr) AccessChain 23 29
|
||||||
61: 6(float) CompositeExtract 53 1 1
|
59: 14(fvec3) Load 58
|
||||||
62: 6(float) CompositeExtract 53 1 2
|
60: 7(fvec4) MatrixTimesVector 57 59
|
||||||
63: 6(float) CompositeExtract 53 1 3
|
Store 49(r10) 60
|
||||||
64: 6(float) CompositeExtract 53 2 0
|
64: 63(ptr) AccessChain 23 62
|
||||||
65: 6(float) CompositeExtract 53 2 1
|
65: 16 Load 64
|
||||||
66: 6(float) CompositeExtract 53 2 2
|
66: 39(ptr) AccessChain 23 38
|
||||||
67: 6(float) CompositeExtract 53 2 3
|
67: 7(fvec4) Load 66
|
||||||
68: 7(fvec4) CompositeConstruct 56 57 58 59
|
68: 6(float) CompositeExtract 67 0
|
||||||
69: 7(fvec4) CompositeConstruct 60 61 62 63
|
69: 6(float) CompositeExtract 67 1
|
||||||
70: 7(fvec4) CompositeConstruct 64 65 66 67
|
70: 6(float) CompositeExtract 67 2
|
||||||
71: 16 CompositeConstruct 68 69 70
|
71: 14(fvec3) CompositeConstruct 68 69 70
|
||||||
72: 30(ptr) AccessChain 23 29
|
72: 7(fvec4) MatrixTimesVector 65 71
|
||||||
73: 14(fvec3) Load 72
|
Store 61(r11) 72
|
||||||
74: 7(fvec4) MatrixTimesVector 71 73
|
74: 30(ptr) AccessChain 23 29
|
||||||
Store 49(r10) 74
|
75: 14(fvec3) Load 74
|
||||||
78: 77(ptr) AccessChain 23 76
|
76: 51(ptr) AccessChain 23 50
|
||||||
79: 16 Load 78
|
77: 13 Load 76
|
||||||
80: 39(ptr) AccessChain 23 38
|
78: 7(fvec4) CompositeExtract 77 0
|
||||||
81: 7(fvec4) Load 80
|
79: 14(fvec3) VectorShuffle 78 78 0 1 2
|
||||||
82: 6(float) CompositeExtract 81 0
|
80: 7(fvec4) CompositeExtract 77 1
|
||||||
83: 6(float) CompositeExtract 81 1
|
81: 14(fvec3) VectorShuffle 80 80 0 1 2
|
||||||
84: 6(float) CompositeExtract 81 2
|
82: 7(fvec4) CompositeExtract 77 2
|
||||||
85: 14(fvec3) CompositeConstruct 82 83 84
|
83: 14(fvec3) VectorShuffle 82 82 0 1 2
|
||||||
86: 7(fvec4) MatrixTimesVector 79 85
|
84: 7(fvec4) CompositeExtract 77 3
|
||||||
Store 75(r11) 86
|
85: 14(fvec3) VectorShuffle 84 84 0 1 2
|
||||||
88: 30(ptr) AccessChain 23 29
|
86: 15 CompositeConstruct 79 81 83 85
|
||||||
89: 14(fvec3) Load 88
|
87: 7(fvec4) VectorTimesMatrix 75 86
|
||||||
90: 51(ptr) AccessChain 23 50
|
Store 73(r20) 87
|
||||||
91: 13 Load 90
|
89: 39(ptr) AccessChain 23 38
|
||||||
92: 6(float) CompositeExtract 91 0 0
|
90: 7(fvec4) Load 89
|
||||||
93: 6(float) CompositeExtract 91 0 1
|
91: 6(float) CompositeExtract 90 0
|
||||||
94: 6(float) CompositeExtract 91 0 2
|
92: 6(float) CompositeExtract 90 1
|
||||||
95: 6(float) CompositeExtract 91 1 0
|
93: 6(float) CompositeExtract 90 2
|
||||||
96: 6(float) CompositeExtract 91 1 1
|
94: 14(fvec3) CompositeConstruct 91 92 93
|
||||||
97: 6(float) CompositeExtract 91 1 2
|
97: 96(ptr) AccessChain 23 95
|
||||||
98: 6(float) CompositeExtract 91 2 0
|
98: 15 Load 97
|
||||||
99: 6(float) CompositeExtract 91 2 1
|
99: 7(fvec4) VectorTimesMatrix 94 98
|
||||||
100: 6(float) CompositeExtract 91 2 2
|
Store 88(r21) 99
|
||||||
101: 6(float) CompositeExtract 91 3 0
|
105: 104(ptr) AccessChain 23 103
|
||||||
102: 6(float) CompositeExtract 91 3 1
|
106: 17 Load 105
|
||||||
103: 6(float) CompositeExtract 91 3 2
|
109: 108(ptr) AccessChain 23 107
|
||||||
104: 14(fvec3) CompositeConstruct 92 93 94
|
110: 18 Load 109
|
||||||
105: 14(fvec3) CompositeConstruct 95 96 97
|
111: 7(fvec4) CompositeExtract 110 0
|
||||||
106: 14(fvec3) CompositeConstruct 98 99 100
|
112: 14(fvec3) VectorShuffle 111 111 0 1 2
|
||||||
107: 14(fvec3) CompositeConstruct 101 102 103
|
113: 7(fvec4) CompositeExtract 110 1
|
||||||
108: 15 CompositeConstruct 104 105 106 107
|
114: 14(fvec3) VectorShuffle 113 113 0 1 2
|
||||||
109: 7(fvec4) VectorTimesMatrix 89 108
|
115: 100 CompositeConstruct 112 114
|
||||||
Store 87(r20) 109
|
116: 100 MatrixTimesMatrix 106 115
|
||||||
111: 39(ptr) AccessChain 23 38
|
Store 102(r30) 116
|
||||||
112: 7(fvec4) Load 111
|
119: 108(ptr) AccessChain 23 107
|
||||||
113: 6(float) CompositeExtract 112 0
|
120: 18 Load 119
|
||||||
114: 6(float) CompositeExtract 112 1
|
121: 104(ptr) AccessChain 23 103
|
||||||
115: 6(float) CompositeExtract 112 2
|
122: 17 Load 121
|
||||||
116: 14(fvec3) CompositeConstruct 113 114 115
|
124: 14(fvec3) CompositeExtract 122 0
|
||||||
119: 118(ptr) AccessChain 23 117
|
125: 19(fvec2) VectorShuffle 124 124 0 1
|
||||||
120: 15 Load 119
|
126: 14(fvec3) CompositeExtract 122 1
|
||||||
121: 7(fvec4) VectorTimesMatrix 116 120
|
127: 19(fvec2) VectorShuffle 126 126 0 1
|
||||||
Store 110(r21) 121
|
128: 14(fvec3) CompositeExtract 122 2
|
||||||
127: 126(ptr) AccessChain 23 125
|
129: 19(fvec2) VectorShuffle 128 128 0 1
|
||||||
128: 17 Load 127
|
130: 123 CompositeConstruct 125 127 129
|
||||||
131: 130(ptr) AccessChain 23 129
|
131: 16 MatrixTimesMatrix 120 130
|
||||||
132: 18 Load 131
|
Store 118(r31) 131
|
||||||
133: 6(float) CompositeExtract 132 0 0
|
136: 135(ptr) AccessChain 23 134
|
||||||
134: 6(float) CompositeExtract 132 0 1
|
137: 20 Load 136
|
||||||
135: 6(float) CompositeExtract 132 0 2
|
138: 19(fvec2) CompositeExtract 137 0
|
||||||
136: 6(float) CompositeExtract 132 1 0
|
139: 19(fvec2) CompositeExtract 137 1
|
||||||
137: 6(float) CompositeExtract 132 1 1
|
140: 19(fvec2) CompositeExtract 137 2
|
||||||
138: 6(float) CompositeExtract 132 1 2
|
141: 123 CompositeConstruct 138 139 140
|
||||||
139: 14(fvec3) CompositeConstruct 133 134 135
|
142: 104(ptr) AccessChain 23 103
|
||||||
140: 14(fvec3) CompositeConstruct 136 137 138
|
143: 17 Load 142
|
||||||
141: 122 CompositeConstruct 139 140
|
144: 123 MatrixTimesMatrix 141 143
|
||||||
142: 122 MatrixTimesMatrix 128 141
|
Store 133(r32) 144
|
||||||
Store 124(r30) 142
|
147: 104(ptr) AccessChain 23 103
|
||||||
145: 130(ptr) AccessChain 23 129
|
|
||||||
146: 18 Load 145
|
|
||||||
147: 126(ptr) AccessChain 23 125
|
|
||||||
148: 17 Load 147
|
148: 17 Load 147
|
||||||
150: 6(float) CompositeExtract 148 0 0
|
149: 14(fvec3) CompositeExtract 148 0
|
||||||
151: 6(float) CompositeExtract 148 0 1
|
150: 14(fvec3) CompositeExtract 148 1
|
||||||
152: 6(float) CompositeExtract 148 1 0
|
151: 100 CompositeConstruct 149 150
|
||||||
153: 6(float) CompositeExtract 148 1 1
|
152: 135(ptr) AccessChain 23 134
|
||||||
154: 6(float) CompositeExtract 148 2 0
|
153: 20 Load 152
|
||||||
155: 6(float) CompositeExtract 148 2 1
|
154: 15 MatrixTimesMatrix 151 153
|
||||||
156: 19(fvec2) CompositeConstruct 150 151
|
Store 146(r33) 154
|
||||||
157: 19(fvec2) CompositeConstruct 152 153
|
155: 7(fvec4) Load 49(r10)
|
||||||
158: 19(fvec2) CompositeConstruct 154 155
|
156: 7(fvec4) Load 61(r11)
|
||||||
159: 149 CompositeConstruct 156 157 158
|
157: 7(fvec4) FAdd 155 156
|
||||||
160: 16 MatrixTimesMatrix 146 159
|
158: 7(fvec4) Load 73(r20)
|
||||||
Store 144(r31) 160
|
159: 7(fvec4) FAdd 157 158
|
||||||
165: 164(ptr) AccessChain 23 163
|
160: 7(fvec4) Load 88(r21)
|
||||||
166: 20 Load 165
|
161: 7(fvec4) FAdd 159 160
|
||||||
167: 6(float) CompositeExtract 166 0 0
|
162: 6(float) Load 12(r00)
|
||||||
168: 6(float) CompositeExtract 166 0 1
|
163: 7(fvec4) CompositeConstruct 162 162 162 162
|
||||||
169: 6(float) CompositeExtract 166 1 0
|
164: 7(fvec4) FAdd 161 163
|
||||||
170: 6(float) CompositeExtract 166 1 1
|
165: 6(float) Load 37(r01)
|
||||||
171: 6(float) CompositeExtract 166 2 0
|
166: 7(fvec4) CompositeConstruct 165 165 165 165
|
||||||
172: 6(float) CompositeExtract 166 2 1
|
167: 7(fvec4) FAdd 164 166
|
||||||
173: 19(fvec2) CompositeConstruct 167 168
|
170: 11(ptr) AccessChain 102(r30) 50 169
|
||||||
174: 19(fvec2) CompositeConstruct 169 170
|
171: 6(float) Load 170
|
||||||
175: 19(fvec2) CompositeConstruct 171 172
|
172: 7(fvec4) CompositeConstruct 171 171 171 171
|
||||||
176: 149 CompositeConstruct 173 174 175
|
173: 7(fvec4) FAdd 167 172
|
||||||
177: 126(ptr) AccessChain 23 125
|
174: 48(ptr) AccessChain 118(r31) 50
|
||||||
178: 17 Load 177
|
175: 7(fvec4) Load 174
|
||||||
179: 149 MatrixTimesMatrix 176 178
|
176: 7(fvec4) FAdd 173 175
|
||||||
Store 162(r32) 179
|
177: 11(ptr) AccessChain 133(r32) 50 169
|
||||||
182: 126(ptr) AccessChain 23 125
|
178: 6(float) Load 177
|
||||||
183: 17 Load 182
|
179: 7(fvec4) CompositeConstruct 178 178 178 178
|
||||||
184: 6(float) CompositeExtract 183 0 0
|
180: 7(fvec4) FAdd 176 179
|
||||||
185: 6(float) CompositeExtract 183 0 1
|
181: 15 Load 146(r33)
|
||||||
186: 6(float) CompositeExtract 183 0 2
|
182: 16 Transpose 181
|
||||||
187: 6(float) CompositeExtract 183 1 0
|
183: 7(fvec4) CompositeExtract 182 0
|
||||||
188: 6(float) CompositeExtract 183 1 1
|
184: 7(fvec4) FAdd 180 183
|
||||||
189: 6(float) CompositeExtract 183 1 2
|
ReturnValue 184
|
||||||
190: 14(fvec3) CompositeConstruct 184 185 186
|
|
||||||
191: 14(fvec3) CompositeConstruct 187 188 189
|
|
||||||
192: 122 CompositeConstruct 190 191
|
|
||||||
193: 164(ptr) AccessChain 23 163
|
|
||||||
194: 20 Load 193
|
|
||||||
195: 15 MatrixTimesMatrix 192 194
|
|
||||||
Store 181(r33) 195
|
|
||||||
196: 7(fvec4) Load 49(r10)
|
|
||||||
197: 7(fvec4) Load 75(r11)
|
|
||||||
198: 7(fvec4) FAdd 196 197
|
|
||||||
199: 7(fvec4) Load 87(r20)
|
|
||||||
200: 7(fvec4) FAdd 198 199
|
|
||||||
201: 7(fvec4) Load 110(r21)
|
|
||||||
202: 7(fvec4) FAdd 200 201
|
|
||||||
203: 6(float) Load 12(r00)
|
|
||||||
204: 7(fvec4) CompositeConstruct 203 203 203 203
|
|
||||||
205: 7(fvec4) FAdd 202 204
|
|
||||||
206: 6(float) Load 37(r01)
|
|
||||||
207: 7(fvec4) CompositeConstruct 206 206 206 206
|
|
||||||
208: 7(fvec4) FAdd 205 207
|
|
||||||
211: 11(ptr) AccessChain 124(r30) 50 210
|
|
||||||
212: 6(float) Load 211
|
|
||||||
213: 7(fvec4) CompositeConstruct 212 212 212 212
|
|
||||||
214: 7(fvec4) FAdd 208 213
|
|
||||||
215: 48(ptr) AccessChain 144(r31) 50
|
|
||||||
216: 7(fvec4) Load 215
|
|
||||||
217: 7(fvec4) FAdd 214 216
|
|
||||||
218: 11(ptr) AccessChain 162(r32) 50 210
|
|
||||||
219: 6(float) Load 218
|
|
||||||
220: 7(fvec4) CompositeConstruct 219 219 219 219
|
|
||||||
221: 7(fvec4) FAdd 217 220
|
|
||||||
222: 15 Load 181(r33)
|
|
||||||
223: 16 Transpose 222
|
|
||||||
224: 7(fvec4) CompositeExtract 223 0
|
|
||||||
225: 7(fvec4) FAdd 221 224
|
|
||||||
ReturnValue 225
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user