i965: Use nir_lower_passthrough_edgeflags
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 11 Jun 2021 03:53:26 +0000 (22:53 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 11 Jun 2021 21:19:06 +0000 (21:19 +0000)
commite23b55c3f02851aad6deba746ff9e8598d6f78de
tree1a4551bd538667b29e66211df680196fdbd7e574
parenteff418fe577f9e775b425d1166fcdf83567e8699
i965: Use nir_lower_passthrough_edgeflags

Now that there's a common NIR pass, there's no point in us doing this in
the back-end anymore.  In order to use this pass in i965, we do have to
make one tiny change.  Gallium runs the pass after assigning input and
output locations and so needs the pass to respect those locations and
num_inputs.  i965, however, runs it before any location assignment or
I/O lowering so we don't care.  We do, however, need the pass to succeed
with num_inputs == 0 because we set that later.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11313>
src/compiler/nir/nir_lower_passthrough_edgeflags.c
src/intel/compiler/brw_vec4.cpp
src/intel/compiler/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vs.c