nir: patch up deref-vars when lowering clip-planes
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 30 Oct 2019 13:53:56 +0000 (14:53 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 12 Nov 2019 08:13:22 +0000 (09:13 +0100)
commit9b8964d06473bda4972c3f00ef68025bf2206c3e
treed8062170182fa76cdfbc712260e9d3dd08535151
parentbef7b2f805f20661733ecc6b6499551d83c512e3
nir: patch up deref-vars when lowering clip-planes

Otherwise, we fail validation and potentially generate invalid code.
Let's fix up the mode of the accesses to the variable.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/nir/nir_lower_clip.c