SPV: Fix array strides by explicitly computing them in the getBaseAlignment() algorithm.

This commit is contained in:
John Kessenich
2015-12-29 17:11:44 -07:00
parent e0b6cad44f
commit 4998789d4e
9 changed files with 83 additions and 61 deletions

View File

@@ -100,7 +100,7 @@ Linked vertex stage:
MemberDecorate 14(S) 1 Offset 16
MemberDecorate 14(S) 1 MatrixStride 16
MemberDecorate 14(S) 2 Offset 144
Decorate 18 ArrayStride 16
Decorate 18 ArrayStride 480
MemberDecorate 19(Block140) 0 Offset 0
MemberDecorate 19(Block140) 1 Offset 16
MemberDecorate 19(Block140) 2 Offset 976
@@ -113,7 +113,7 @@ Linked vertex stage:
MemberDecorate 22(S) 1 Offset 16
MemberDecorate 22(S) 1 MatrixStride 8
MemberDecorate 22(S) 2 Offset 80
Decorate 24 ArrayStride 16
Decorate 24 ArrayStride 288
MemberDecorate 25(Block430) 0 Offset 0
MemberDecorate 25(Block430) 1 Offset 16
MemberDecorate 25(Block430) 2 Offset 592

View File

@@ -1,15 +1,15 @@
#### BEGIN COMPILER 0 INFO LOG ####
0:? Sequence
0:37 Function Definition: main( (void)
0:37 Function Parameters:
0:39 Sequence
0:39 move second child to first child (4-component vector of float)
0:39 'gl_FragColor' (FragColor 4-component vector of float)
0:39 Construct vec4 (4-component vector of float)
0:39 'color' (varying in 3-component vector of float)
0:39 1.000000 (const float)
#### END COMPILER 0 INFO LOG ####
#### BEGIN LINKER INFO LOG ####
#### END LINKER INFO LOG ####
#### BEGIN COMPILER 0 INFO LOG ####
0:? Sequence
0:37 Function Definition: main( (void)
0:37 Function Parameters:
0:39 Sequence
0:39 move second child to first child (4-component vector of float)
0:39 'gl_FragColor' (FragColor 4-component vector of float)
0:39 Construct vec4 (4-component vector of float)
0:39 'color' (varying in 3-component vector of float)
0:39 1.000000 (const float)
#### END COMPILER 0 INFO LOG ####
#### BEGIN LINKER INFO LOG ####
#### END LINKER INFO LOG ####

View File

@@ -1,20 +1,20 @@
#### BEGIN COMPILER 0 INFO LOG ####
0:? Sequence
0:37 Function Definition: main( (void)
0:37 Function Parameters:
0:39 Sequence
0:39 move second child to first child (3-component vector of float)
0:39 'color' (varying out 3-component vector of float)
0:39 1.000000 (const float)
0:39 1.000000 (const float)
0:39 1.000000 (const float)
0:41 move second child to first child (4-component vector of float)
0:41 'gl_Position' (Position 4-component vector of float)
0:41 matrix-times-vector (4-component vector of float)
0:41 'gl_ModelViewProjectionMatrix' (uniform 4X4 matrix of float)
0:41 'gl_Vertex' (attribute 4-component vector of float)
#### END COMPILER 0 INFO LOG ####
#### BEGIN LINKER INFO LOG ####
#### END LINKER INFO LOG ####
#### BEGIN COMPILER 0 INFO LOG ####
0:? Sequence
0:37 Function Definition: main( (void)
0:37 Function Parameters:
0:39 Sequence
0:39 move second child to first child (3-component vector of float)
0:39 'color' (varying out 3-component vector of float)
0:39 1.000000 (const float)
0:39 1.000000 (const float)
0:39 1.000000 (const float)
0:41 move second child to first child (4-component vector of float)
0:41 'gl_Position' (Position 4-component vector of float)
0:41 matrix-times-vector (4-component vector of float)
0:41 'gl_ModelViewProjectionMatrix' (uniform 4X4 matrix of float)
0:41 'gl_Vertex' (attribute 4-component vector of float)
#### END COMPILER 0 INFO LOG ####
#### BEGIN LINKER INFO LOG ####
#### END LINKER INFO LOG ####