GL_ARB_enhanced_layouts, part 6: Numerical side of uniform offset and align semantics. Included

- moving offset calculations for std140/std430 from reflection to linkValidate.cpp
 - applying the offset/align rules on top of std140/std430
 - removing caching the structure's number of components (and correcting that this is components, not size)


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25174 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2014-01-31 02:40:19 +00:00
parent 04b1c6ed4c
commit ac1e188f3b
15 changed files with 367 additions and 219 deletions

View File

@@ -32,12 +32,12 @@ ERROR: node is still EOpNull!
0:46 add (highp 4X4 matrix of float)
0:46 add (highp 4X4 matrix of float)
0:46 add (highp 4X4 matrix of float)
0:46 M1: direct index for structure (layout(row_major std140 ) uniform highp 4X4 matrix of float)
0:46 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 ) centroid uniform highp float badf, layout(row_major std140 ) uniform highp float badg, layout(row_major std140 ) uniform highp float bad1, layout(row_major shared ) uniform highp float bad2, layout(row_major packed ) uniform highp float bad3})
0:46 M1: direct index for structure (layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float)
0:46 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
0:46 Constant:
0:46 0 (const int)
0:46 M2: direct index for structure (layout(column_major std140 ) uniform highp 4X4 matrix of float)
0:46 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 ) centroid uniform highp float badf, layout(row_major std140 ) uniform highp float badg, layout(row_major std140 ) uniform highp float bad1, layout(row_major shared ) uniform highp float bad2, layout(row_major packed ) uniform highp float bad3})
0:46 M2: direct index for structure (layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float)
0:46 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
0:46 Constant:
0:46 1 (const int)
0:46 M4: direct index for structure (layout(row_major shared ) uniform highp 4X4 matrix of float)
@@ -56,8 +56,8 @@ ERROR: node is still EOpNull!
0:47 'color' (smooth out highp 3-component vector of float)
0:47 vector-times-matrix (highp 3-component vector of float)
0:47 'c' (layout(location=7 ) in highp 3-component vector of float)
0:47 N1: direct index for structure (layout(row_major std140 ) uniform highp 3X3 matrix of float)
0:47 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 ) centroid uniform highp float badf, layout(row_major std140 ) uniform highp float badg, layout(row_major std140 ) uniform highp float bad1, layout(row_major shared ) uniform highp float bad2, layout(row_major packed ) uniform highp float bad3})
0:47 N1: direct index for structure (layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float)
0:47 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
0:47 Constant:
0:47 2 (const int)
0:? Linker Objects
@@ -68,7 +68,7 @@ ERROR: node is still EOpNull!
0:? 'pos' (smooth out highp 4-component vector of float)
0:? 'color' (smooth out highp 3-component vector of float)
0:? 'badm4' (layout(column_major shared ) uniform highp 4X4 matrix of float)
0:? 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 ) centroid uniform highp float badf, layout(row_major std140 ) uniform highp float badg, layout(row_major std140 ) uniform highp float bad1, layout(row_major shared ) uniform highp float bad2, layout(row_major packed ) uniform highp float bad3})
0:? 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
0:? '__anon__0' (layout(row_major shared ) uniform block{layout(row_major shared ) uniform bool b, layout(row_major shared ) uniform highp 4X4 matrix of float t2m})
0:? '__anon__2' (out block{out highp float f})
0:? 'badoutA' (layout(location=10 ) smooth out highp 4-component vector of float)