nir/deref: Add helpers for getting offsets
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 29 Jun 2018 21:44:19 +0000 (14:44 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 2 Jul 2018 19:09:41 +0000 (12:09 -0700)
commite8e159e9df40ee76468e05be073d94ec78d4bf32
tree3f2496be58db2298766ee8033595775d91ce5ed5
parent2bf8be99b0f3dedd8fb23eeba998f6e1c540edf7
nir/deref: Add helpers for getting offsets

These are very similar to the related function in nir_lower_io except
that they don't handle per-vertex or packed things (that could be added,
in theory) and they take a more detailed size/align function pointer.
One day, we should consider switching nir_lower_io over to using the
more detailed size/align functions and then we could make it use these
helpers instead of having its own.

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/nir_deref.c
src/compiler/nir/nir_deref.h