From: Brian Paul Date: Wed, 16 Jan 2013 15:47:55 +0000 (-0700) Subject: st/mesa: simplify some src/dst surface setup in BlitFramebuffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af7b4b01f1b61d6177d947bec2ecdfae28d0874d;p=mesa.git st/mesa: simplify some src/dst surface setup in BlitFramebuffer Use the renderbuffer attachment pointers that we grabbed earlier. Reviewed-by: Reviewed-by: Marek Olšák --- diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index 603c8d4b441..d6194bf15eb 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -243,16 +243,16 @@ st_BlitFramebuffer(struct gl_context *ctx, &drawFB->Attachment[BUFFER_STENCIL]; struct st_renderbuffer *srcDepthRb = - st_renderbuffer(readFB->Attachment[BUFFER_DEPTH].Renderbuffer); + st_renderbuffer(srcDepth->Renderbuffer); struct st_renderbuffer *dstDepthRb = - st_renderbuffer(drawFB->Attachment[BUFFER_DEPTH].Renderbuffer); + st_renderbuffer(dstDepth->Renderbuffer); struct pipe_surface *dstDepthSurf = dstDepthRb ? dstDepthRb->surface : NULL; struct st_renderbuffer *srcStencilRb = - st_renderbuffer(readFB->Attachment[BUFFER_STENCIL].Renderbuffer); + st_renderbuffer(srcStencil->Renderbuffer); struct st_renderbuffer *dstStencilRb = - st_renderbuffer(drawFB->Attachment[BUFFER_STENCIL].Renderbuffer); + st_renderbuffer(dstStencil->Renderbuffer); struct pipe_surface *dstStencilSurf = dstStencilRb ? dstStencilRb->surface : NULL;