diff options
author | Marek Olšák <[email protected]> | 2013-03-14 14:22:56 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-03-23 13:17:05 +0100 |
commit | f8855a42141cc76cf6954eee2af80e7dbc932c85 (patch) | |
tree | 24bc13461bb89755708ca6f7fcfe59642a76180f /src/mesa/state_tracker/st_cb_blit.c | |
parent | 2dc2066b90581ae3878ef7846f961bcb5bd07651 (diff) |
mesa: add helper func for checking combined depthstencil buffers from st/mesa
Reviewed-by: Brian Paul <[email protected]>
Tested-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_blit.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_blit.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index c463e3b047a..50cab4294da 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -239,31 +239,22 @@ st_BlitFramebuffer(struct gl_context *ctx, /* depth and/or stencil blit */ /* get src/dst depth surfaces */ - struct gl_renderbuffer_attachment *srcDepth = - &readFB->Attachment[BUFFER_DEPTH]; - struct gl_renderbuffer_attachment *dstDepth = - &drawFB->Attachment[BUFFER_DEPTH]; - struct gl_renderbuffer_attachment *srcStencil = - &readFB->Attachment[BUFFER_STENCIL]; - struct gl_renderbuffer_attachment *dstStencil = - &drawFB->Attachment[BUFFER_STENCIL]; - struct st_renderbuffer *srcDepthRb = - st_renderbuffer(srcDepth->Renderbuffer); + st_renderbuffer(readFB->Attachment[BUFFER_DEPTH].Renderbuffer); struct st_renderbuffer *dstDepthRb = - st_renderbuffer(dstDepth->Renderbuffer); + st_renderbuffer(drawFB->Attachment[BUFFER_DEPTH].Renderbuffer); struct pipe_surface *dstDepthSurf = dstDepthRb ? dstDepthRb->surface : NULL; struct st_renderbuffer *srcStencilRb = - st_renderbuffer(srcStencil->Renderbuffer); + st_renderbuffer(readFB->Attachment[BUFFER_STENCIL].Renderbuffer); struct st_renderbuffer *dstStencilRb = - st_renderbuffer(dstStencil->Renderbuffer); + st_renderbuffer(drawFB->Attachment[BUFFER_STENCIL].Renderbuffer); struct pipe_surface *dstStencilSurf = dstStencilRb ? dstStencilRb->surface : NULL; - if (st_is_depth_stencil_combined(srcDepth, srcStencil) && - st_is_depth_stencil_combined(dstDepth, dstStencil)) { + if (_mesa_has_depthstencil_combined(readFB) && + _mesa_has_depthstencil_combined(drawFB)) { blit.mask = 0; if (mask & GL_DEPTH_BUFFER_BIT) blit.mask |= PIPE_MASK_Z; |