summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915tex
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-09-11 09:21:34 -0600
committerBrian <[email protected]>2007-09-11 09:23:13 -0600
commit995e01a6bcfe280149a2a076b5ea66ee94d0721c (patch)
treebe26854ab39d73b1be19bd140e65efc0289c6976 /src/mesa/drivers/dri/i915tex
parent0c43ab6fbcd43f611170885f2068dd3a06bc6cea (diff)
Update depth test state when binding new framebuffer object
Diffstat (limited to 'src/mesa/drivers/dri/i915tex')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_buffers.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c
index 40f93dac912..cb151ab94d8 100644
--- a/src/mesa/drivers/dri/i915tex/intel_buffers.c
+++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c
@@ -1124,6 +1124,15 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
ctx->Driver.Enable(ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled);
}
+ /*
+ * Update depth test state
+ */
+ if (ctx->Depth.Test && fb->Visual.depthBits > 0) {
+ ctx->Driver.Enable(ctx, GL_DEPTH_TEST, GL_TRUE);
+ }
+ else {
+ ctx->Driver.Enable(ctx, GL_DEPTH_TEST, GL_FALSE);
+ }
/**
** Release old regions, reference new regions