nir/lower_blend: Be more explicit about deref assumptions
authorJason Ekstrand <jason.ekstrand@collabora.com>
Tue, 3 May 2022 14:28:01 +0000 (09:28 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 11 May 2022 14:47:33 +0000 (14:47 +0000)
commitdcfffdcad189ba856705d5569b79a94622c07919
treed1832289d4f09f922bc9c1d0a3f0026547502732
parent885437d1a6cebf30ec2af1e7c554f75ad8621739
nir/lower_blend: Be more explicit about deref assumptions

Because we pull the RT from the variable location and use that to look
up formats, we need a constant RT index.  To deal with arrays (possibly
of arrays), we would either need to handle array derefs (we don't today)
or we need to require the variables to be split into one variable per
RT.  Given that we have to lower indirect derefs anyway (to get constant
indices), we may as well require the client to split output variables by
calling nir_lower_io_arrays_to_elements_no_indirect().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
src/compiler/nir/nir_lower_blend.c