summaryrefslogtreecommitdiffstats
path: root/.dir-locals.el
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-01-12 15:53:53 +1100
committerTimothy Arceri <[email protected]>2016-03-05 19:39:07 +1100
commit037f68d81e192d954a188907fb37254a7b266502 (patch)
treec0fbfd4bc794afd84afbc3d5915754a8c5a65362 /.dir-locals.el
parent5a27fefffec30a88a0e0779583f45ca01aae54a4 (diff)
glsl: apply align layout qualifier rules to block offsets
From Section 4.4.5 (Uniform and Shader Storage Block Layout Qualifiers) of the OpenGL 4.50 spec: "The align qualifier makes the start of each block member have a minimum byte alignment. It does not affect the internal layout within each member, which will still follow the std140 or std430 rules. The specified alignment must be a power of 2, or a compile-time error results. The actual alignment of a member will be the greater of the specified align alignment and the standard (e.g., std140) base alignment for the member's type. The actual offset of a member is computed as follows: If offset was declared, start with that offset, otherwise start with the next available offset. If the resulting offset is not a multiple of the actual alignment, increase it to the first offset that is a multiple of the actual alignment. This results in the actual offset the member will have. When align is applied to an array, it affects only the start of the array, not the array's internal stride. Both an offset and an align qualifier can be specified on a declaration. The align qualifier, when used on a block, has the same effect as qualifying each member with the same align value as declared on the block, and gets the same compile-time results and errors as if this had been done. As described in general earlier, an individual member can specify its own align, which overrides the block-level align, but just for that member. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to '.dir-locals.el')
0 files changed, 0 insertions, 0 deletions