i965: Be more clever about setting up our viewport clip
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 3 Nov 2017 21:13:08 +0000 (14:13 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 28 Feb 2018 21:31:42 +0000 (13:31 -0800)
commit67da59e320bd5f797f6bdc3ab111f33c64e16811
tree91e67f348cf6122b2d1b706b46b1fbee9366d592
parentdebaa822ef12bc9006dcf95ab76ac8e3432bd9a7
i965: Be more clever about setting up our viewport clip

Before, we were trusting in the hardware to take the intersection
of the viewport clip with the drawing rectangle.  Unfortunately,
3DSTATE_DRAWING_RECTANGLE is fairly expensive because it implicitly
does a full pipeline stall.  If we're a bit more careful with our
viewport clipping, we can just re-emit it once at context creation
time.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/genX_state_upload.c