st/mesa: simplify some src/dst surface setup in BlitFramebuffer
authorBrian Paul <brianp@vmware.com>
Wed, 16 Jan 2013 15:47:55 +0000 (08:47 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 17 Jan 2013 00:06:17 +0000 (17:06 -0700)
Use the renderbuffer attachment pointers that we grabbed earlier.

Reviewed-by: Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/mesa/state_tracker/st_cb_blit.c

index 603c8d4b441be15d351f84070019c93037bff8ec..d6194bf15eb9b98aa6d8385b9143744a9d6a4fff 100644 (file)
@@ -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;