i965: Allow only one slot of clip distances to be set on Gen4-5.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 27 Oct 2018 18:20:28 +0000 (11:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 Nov 2018 22:33:16 +0000 (14:33 -0800)
commit099016864259d162e0c08644fbe19e08abc586b6
treee6bbbc29fb2ac304c69b39eaf49d6cab42b79d90
parent5b682143da1a24f4c66279fb5c6f9deefcb8a986
i965: Allow only one slot of clip distances to be set on Gen4-5.

The existing backend code assumed that if VARYING_SLOT_CLIP_DIST0
was written, then VARYING_SLOT_CLIP_DIST1 would be as well.  That's
true with the current lowering, but not necessary if there are 4 or
fewer clip distances.  Separate out the checks to allow this.

The new NIR-based lowering will trigger this case, which would have
caused backend validation errors (src is null) without this patch.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/intel/compiler/brw_vec4_visitor.cpp