nir: Avoid splitting compact arrays into per-element variables.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 5 Jul 2018 21:34:27 +0000 (14:34 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Feb 2019 21:58:46 +0000 (13:58 -0800)
commit15c69021176395a08febde51ce14a43a15fee07d
tree90ba3e4dc3628434575818759ec218ca2960c788
parentba9dcc80fb2fc103835eef17153895f403d8654e
nir: Avoid splitting compact arrays into per-element variables.

Compact arrays are used for special variables like clip and cull
distances, or tessellation levels.  Drivers using compact arrays
assume that these values will always be actual arrays.  We don't
want to turn a float[1] gl_CullDistance into a single float; that
would confuse drivers.

Today, i965 uses compact arrays, and Gallium drivers use
nir_lower_io_arrays_to_elements, so we haven't had any overlap
that would demonstrate the issue.  Iris will use both.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir/nir_lower_io_arrays_to_elements.c