diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-09-11 09:21:34 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-09-11 09:23:13 -0600 |
commit | 995e01a6bcfe280149a2a076b5ea66ee94d0721c (patch) | |
tree | be26854ab39d73b1be19bd140e65efc0289c6976 /src/mesa/drivers/dri/i915tex/intel_buffers.c | |
parent | 0c43ab6fbcd43f611170885f2068dd3a06bc6cea (diff) |
Update depth test state when binding new framebuffer object
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_buffers.c')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_buffers.c | 9 |
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 40f93dac91..cb151ab94d 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 |