diff options
author | Laura Ekstrand <[email protected]> | 2015-01-30 14:03:53 -0800 |
---|---|---|
committer | Laura Ekstrand <[email protected]> | 2015-02-02 13:21:20 -0800 |
commit | e187c2f5432466c7b49dba266026fb9b01f5f667 (patch) | |
tree | 6232bca416174ed9c15bdbc69b8c6e650cad76c8 /src/mesa/state_tracker | |
parent | ad2c64abbd7326be35fa1f94c7e056e868ee6185 (diff) |
DD: Refactor BlitFramebuffer.
In preparation for glBlitNamedFramebuffer, the DD table function
BlitFramebuffer needs to accept two arbitrary framebuffer objects rather
than assuming ctx->ReadBuffer and ctx->DrawBuffer.
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_blit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index 9c33f4eb99c..bbaedd108f6 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -73,6 +73,8 @@ st_adjust_blit_for_msaa_resolve(struct pipe_blit_info *blit) static void st_BlitFramebuffer(struct gl_context *ctx, + struct gl_framebuffer *readFB, + struct gl_framebuffer *drawFB, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) @@ -83,8 +85,6 @@ st_BlitFramebuffer(struct gl_context *ctx, const uint pFilter = ((filter == GL_NEAREST) ? PIPE_TEX_FILTER_NEAREST : PIPE_TEX_FILTER_LINEAR); - struct gl_framebuffer *readFB = ctx->ReadBuffer; - struct gl_framebuffer *drawFB = ctx->DrawBuffer; struct { GLint srcX0, srcY0, srcX1, srcY1; GLint dstX0, dstY0, dstX1, dstY1; @@ -108,7 +108,7 @@ st_BlitFramebuffer(struct gl_context *ctx, * * XXX: This should depend on mask ! */ - if (!_mesa_clip_blit(ctx, + if (!_mesa_clip_blit(ctx, readFB, drawFB, &clip.srcX0, &clip.srcY0, &clip.srcX1, &clip.srcY1, &clip.dstX0, &clip.dstY0, &clip.dstX1, &clip.dstY1)) { return; /* nothing to draw/blit */ |