On Fri, Aug 20, 2010 at 10:40 AM, Marek Olšák <mar...@gmail.com> wrote: > On Mon, Aug 16, 2010 at 3:55 PM, Roland Scheidegger <srol...@vmware.com> > wrote: >> >> On 14.08.2010 17:47, Marek Olšák wrote: >> > If PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE is not advertised and there is >> > a D24S8 texture bound and the mask is >> > BUFFER_BIT_DEPTH|BUFFER_BIT_STENCIL, >> > the state tracker always cleared the texture with a quad instead of >> > using >> > pipe_context::clear. >> >> > @@ -543,7 +549,7 @@ st_Clear(GLcontext *ctx, GLbitfield mask) >> > */ >> > if ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) && >> > ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) != >> > PIPE_CLEAR_DEPTHSTENCIL) && >> > - (depthRb == stencilRb) && >> > + depth_stencil_combined && >> > (ctx->DrawBuffer->Visual.depthBits == 0 || >> > ctx->DrawBuffer->Visual.stencilBits == 0)) >> > clear_buffers |= PIPE_CLEAR_DEPTHSTENCIL; >> >> I think there's an issue with this code when used for texture >> attachments, we use the Visual information but I don't think that's >> meaningful in that case (Visual information is also used elsewhere in >> the clear code), potentially leading to bogus results. If the code >> didn't handle texture attachments correctly before that bug might have >> been hidden. > > OK, I've attached a new patch which also resolves the issue with the Visual > bits. There is an explanation in the commit message. > > May I push?
I need a bit more time to review this but I committed the part that added the st_is_depth_stencil_combined() function, plus the other patches which help to fix the piglit fbo-blit-d24s8 test. -Brian _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev