summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2011-06-23 01:20:19 -0700
committerChad Versace <[email protected]>2011-06-24 14:47:21 -0700
commit6062692cc6cd2a88d854b304d9a85bcf4bab0d11 (patch)
tree988428ba5defe712ef06f8bbdd2d67d3de6fee3e /src/mesa
parent97f263c229784a55014b32e8b3e420e58f8bc851 (diff)
intel: Fix workaround for _mesa_update_framebuffer
In intel_draw_buffer, there exists a workaround to prevent _mesa_update_framebuffer from creating a swrast depth wrapper when using separate stencil. This commit fixes the workaround, which was incomplete for s8z24 texture renderbuffers. Fixes fbo-blit-d24s8 on gen5 with separate stencil manually enabled. Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 33f691bf5f3..a52a07cd93a 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -105,9 +105,9 @@ intel_draw_buffer(struct gl_context * ctx, struct gl_framebuffer *fb)
/*
* If intel_context is using separate stencil, but the depth attachment
* (gl_framebuffer.Attachment[BUFFER_DEPTH]) has a packed depth/stencil
- * format, then we must install the real depth buffer at
- * gl_framebuffer._DepthBuffer before calling _mesa_update_framebuffer.
- * Otherwise, _mesa_update_framebuffer will create and install a swrast
+ * format, then we must install the real depth buffer at fb->_DepthBuffer
+ * and set fb->_DepthBuffer->Wrapped before calling _mesa_update_framebuffer.
+ * Otherwise, _mesa_update_framebuffer will create and install a swras
* depth wrapper instead.
*
* Ditto for stencil.
@@ -115,11 +115,13 @@ intel_draw_buffer(struct gl_context * ctx, struct gl_framebuffer *fb)
irbDepth = intel_get_renderbuffer(fb, BUFFER_DEPTH);
if (irbDepth && irbDepth->Base.Format == MESA_FORMAT_X8_Z24) {
_mesa_reference_renderbuffer(&fb->_DepthBuffer, &irbDepth->Base);
+ irbDepth->Base.Wrapped = fb->Attachment[BUFFER_DEPTH].Renderbuffer;
}
irbStencil = intel_get_renderbuffer(fb, BUFFER_STENCIL);
if (irbStencil && irbStencil->Base.Format == MESA_FORMAT_S8) {
_mesa_reference_renderbuffer(&fb->_StencilBuffer, &irbStencil->Base);
+ irbStencil->Base.Wrapped = fb->Attachment[BUFFER_STENCIL].Renderbuffer;
}
/* Do this here, not core Mesa, since this function is called from