i965: Delete the brw_vue_program_key::userclip_active flag.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Aug 2015 00:02:27 +0000 (17:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 4 Sep 2015 05:31:03 +0000 (22:31 -0700)
commit082b7f1876095f32578720f30fdc35771b2b3e0a
tree2d13e631d4ba29d65a5e82ddad83bf98ae30a809
parent294282aaa6a517b455d3e31d12e2d85516ac04e6
i965: Delete the brw_vue_program_key::userclip_active flag.

There are two uses of this flag.

The primary use is checking whether we need to emit code to convert
legacy gl_ClipVertex/gl_Position clipping to clip distances.  In this
case, we also have to upload the clip planes as uniforms, which means
setting nr_userclip_plane_consts to a positive value.  Checking if it's
> 0 works for detecting this case.

Gen4-5 also wants to know whether we're doing clipping at all, so it can
emit user clip flags.  Checking if output_reg[VARYING_SLOT_CLIP_DIST0]
is set to a real register suffices for this.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_program.h
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vs.c