i915: Disable the depth test whenever we don't have a depth buffer.
authorEric Anholt <eric@anholt.net>
Tue, 12 Jul 2011 17:48:40 +0000 (10:48 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 18 Jul 2011 18:26:33 +0000 (11:26 -0700)
commitfc4fba52cf7e9616c70dd76b4d6bdba6582e157b
tree94793fe750c01dd4ad9571eec4fbfd1d6986857f
parent4c47fce92e381cb182b51ce6d0727c0a1365e8b0
i915: Disable the depth test whenever we don't have a depth buffer.

We were disabling it once at the moment we changed draw buffers, but
later enabling of depth test could turn it back on.  Fixes
fbo-nodepth-test.

Note that ctx->DrawBuffer has to be checked because during context
create we get called while it's still unset.  However, we know we'll
get an intel_draw_buffer() after that, so it's safe to make a silly
choice at this point.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30080
src/mesa/drivers/dri/i915/i915_state.c
src/mesa/drivers/dri/i915/i915_vtbl.c