nir: lower-io-types pass
authorRob Clark <robclark@freedesktop.org>
Fri, 25 Mar 2016 19:15:44 +0000 (15:15 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 11 May 2016 16:20:11 +0000 (12:20 -0400)
commit5261947260bf63693fc13eaaf8a1e845ab130a57
tree4b9e520742f6b1936095000df6f44100142c8a61
parentb10cc245198d375b940a49b4f93a73bc75e47ce8
nir: lower-io-types pass

A pass to lower complex (struct/array/mat) inputs/outputs to primitive
types.  This allows, for example, linking that removes unused components
of a larger type which is not indirectly accessed.

In the near term, it is needed for gallium (mesa/st) support for NIR,
since only used components of a type are assigned VBO slots, and we
otherwise have no way to represent that to the driver backend.  But it
should be useful for doing shader linking in NIR.

v2: use glsl_count_attribute_slots() rather than passing a type_size
    fxn pointer

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/Makefile.sources
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_io_types.c [new file with mode: 0644]