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 <chad@chad-versace.us>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user