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/drivers/common/meta_tex_subimage.c | |
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/drivers/common/meta_tex_subimage.c')
-rw-r--r-- | src/mesa/drivers/common/meta_tex_subimage.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c index 977ee5ad93e..68c8273fe4f 100644 --- a/src/mesa/drivers/common/meta_tex_subimage.c +++ b/src/mesa/drivers/common/meta_tex_subimage.c @@ -206,7 +206,8 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims, _mesa_update_state(ctx); - if (_mesa_meta_BlitFramebuffer(ctx, 0, 0, width, height, + if (_mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer, + 0, 0, width, height, xoffset, yoffset, xoffset + width, yoffset + height, GL_COLOR_BUFFER_BIT, GL_NEAREST)) @@ -220,7 +221,8 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims, _mesa_update_state(ctx); - _mesa_meta_BlitFramebuffer(ctx, 0, 0, width, height, + _mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer, + 0, 0, width, height, xoffset, yoffset, xoffset + width, yoffset + height, GL_COLOR_BUFFER_BIT, GL_NEAREST); @@ -324,7 +326,8 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims, _mesa_update_state(ctx); - if (_mesa_meta_BlitFramebuffer(ctx, xoffset, yoffset, + if (_mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer, + xoffset, yoffset, xoffset + width, yoffset + height, 0, 0, width, height, GL_COLOR_BUFFER_BIT, GL_NEAREST)) @@ -338,7 +341,8 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims, _mesa_update_state(ctx); - _mesa_meta_BlitFramebuffer(ctx, xoffset, yoffset, + _mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer, + xoffset, yoffset, xoffset + width, yoffset + height, 0, 0, width, height, GL_COLOR_BUFFER_BIT, GL_NEAREST); |