summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorLaura Ekstrand <laura@jlekstrand.net>2015-01-30 14:03:53 -0800
committerLaura Ekstrand <laura@jlekstrand.net>2015-02-02 13:21:20 -0800
commite187c2f5432466c7b49dba266026fb9b01f5f667 (patch)
tree6232bca416174ed9c15bdbc69b8c6e650cad76c8 /src/mesa/main/image.c
parentad2c64abbd7326be35fa1f94c7e056e868ee6185 (diff)
downloadexternal_mesa3d-e187c2f5432466c7b49dba266026fb9b01f5f667.zip
external_mesa3d-e187c2f5432466c7b49dba266026fb9b01f5f667.tar.gz
external_mesa3d-e187c2f5432466c7b49dba266026fb9b01f5f667.tar.bz2
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 <jason.ekstrand@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 9ad97c5..c37900c 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -861,19 +861,21 @@ clip_left_or_bottom(GLint *srcX0, GLint *srcX1,
*/
GLboolean
_mesa_clip_blit(struct gl_context *ctx,
+ const struct gl_framebuffer *readFb,
+ const struct gl_framebuffer *drawFb,
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1)
{
const GLint srcXmin = 0;
- const GLint srcXmax = ctx->ReadBuffer->Width;
+ const GLint srcXmax = readFb->Width;
const GLint srcYmin = 0;
- const GLint srcYmax = ctx->ReadBuffer->Height;
+ const GLint srcYmax = readFb->Height;
/* these include scissor bounds */
- const GLint dstXmin = ctx->DrawBuffer->_Xmin;
- const GLint dstXmax = ctx->DrawBuffer->_Xmax;
- const GLint dstYmin = ctx->DrawBuffer->_Ymin;
- const GLint dstYmax = ctx->DrawBuffer->_Ymax;
+ const GLint dstXmin = drawFb->_Xmin;
+ const GLint dstXmax = drawFb->_Xmax;
+ const GLint dstYmin = drawFb->_Ymin;
+ const GLint dstYmax = drawFb->_Ymax;
/*
printf("PreClipX: src: %d .. %d dst: %d .. %d\n",