nir/types: Add a natural size and alignment helper
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 29 Jun 2018 21:14:52 +0000 (14:14 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 2 Jul 2018 19:09:39 +0000 (12:09 -0700)
commit2bf8be99b0f3dedd8fb23eeba998f6e1c540edf7
tree7f5cad6f18d88b73d2d7ebd2b7b745859799dba4
parent893fc2d07d382c0b9563c0b48215a0e260f17d4b
nir/types: Add a natural size and alignment helper

The size and alignment are "natural" in the sense that everything is
aligned to a scalar.  This is a bit tighter than std430 where vec3s are
required to be aligned to a vec4.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir_types.cpp
src/compiler/nir_types.h