nir: Make nir_lower_clip_vs optionally work with variables.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 22 May 2017 02:26:15 +0000 (19:26 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 Nov 2018 22:33:16 +0000 (14:33 -0800)
commit5b682143da1a24f4c66279fb5c6f9deefcb8a986
tree7484fbbfac996271afd74710049607ef20466f25
parentd0f746b6458e375a7f58f4f46a36f16dbb7089e1
nir: Make nir_lower_clip_vs optionally work with variables.

The way nir_lower_clip_vs() works with store_output intrinsics makes a
ton of assumptions about the driver_location field.

In i965 and iris, I'd rather do this lowering early and work with
variables.  v3d may want to switch to that as well, and ir3 could too,
but I'm not sure exactly what would need updating.  For now, handle
both methods.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/broadcom/compiler/vir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_clip.c
src/gallium/drivers/freedreno/ir3/ir3_nir.c
src/gallium/drivers/vc4/vc4_program.c