i915: Fix incorrect depth scaling when enabling/disabling depth buffers.
authorEric Anholt <eric@anholt.net>
Tue, 12 Jul 2011 20:47:21 +0000 (13:47 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 18 Jul 2011 18:26:33 +0000 (11:26 -0700)
commitdebf751aeaf0f02b9a7fc0e242ae3b97dde8416f
treea15ceec51c3427ffcedea4835fe3b4da4192468f
parent79fee3a76b7f4f63d01266fc3a3cd6ca44d1e513
i915: Fix incorrect depth scaling when enabling/disabling depth buffers.

We were updating our new viewport using the old buffers' _WindowMap.m.
We can do less math and avoid using that deprecated matrix by just
folding the viewport calculation right in to the driver.

Fixes piglit fbo-depthtex.
src/mesa/drivers/dri/i915/i915_state.c