i965 Gen6+: De-compact clip planes.
authorPaul Berry <stereotype441@gmail.com>
Tue, 27 Sep 2011 19:57:08 +0000 (12:57 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 7 Oct 2011 02:29:14 +0000 (19:29 -0700)
commit018ea68d8780ab5baeef0b8122b8410e5e55ae6d
treefac8a7a1bcc65420a1d29edf418124753348d124
parentf4f686e825ad2d64e50fb9e2491ef60507d59c38
i965 Gen6+: De-compact clip planes.

Previously, if the user enabled a non-consecutive set of clip planes
(e.g. 0, 1, and 3), the driver would compact them down to a
consecutive set starting at 0.  This optimization was of dubious
value, and complicated the implementation of gl_ClipDistance.

This patch changes the driver so that with Gen6 and later chipsets, we
no longer compact the clip planes.  However, we still discard any clip
planes beyond the highest number that is in use, so performance should
not be affected for applications that use clip planes consecutively
from 0.

With chipsets previous to Gen6, we still compact the clip planes,
since the pre-Gen6 clipper thread relies on this behavior.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_state.h
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/brw_vs.h
src/mesa/drivers/dri/i965/brw_vs_emit.c
src/mesa/drivers/dri/i965/gen6_clip_state.c
src/mesa/drivers/dri/i965/gen7_clip_state.c