aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
diff options
context:
space:
mode:
authorLaura Ekstrand <[email protected]>2015-01-30 14:03:53 -0800
committerLaura Ekstrand <[email protected]>2015-02-02 13:21:20 -0800
commite187c2f5432466c7b49dba266026fb9b01f5f667 (patch)
tree6232bca416174ed9c15bdbc69b8c6e650cad76c8 /src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
parentad2c64abbd7326be35fa1f94c7e056e868ee6185 (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/dri/i965/brw_meta_stencil_blit.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
index b9b481b90eb..fc7018d15b9 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
@@ -460,15 +460,17 @@ error:
void
brw_meta_fbo_stencil_blit(struct brw_context *brw,
+ struct gl_framebuffer *read_fb,
+ struct gl_framebuffer *draw_fb,
GLfloat src_x0, GLfloat src_y0,
GLfloat src_x1, GLfloat src_y1,
GLfloat dst_x0, GLfloat dst_y0,
GLfloat dst_x1, GLfloat dst_y1)
{
struct gl_context *ctx = &brw->ctx;
- struct gl_renderbuffer *draw_fb =
- ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Renderbuffer;
- const struct intel_renderbuffer *dst_irb = intel_renderbuffer(draw_fb);
+ struct gl_renderbuffer *draw_rb =
+ draw_fb->Attachment[BUFFER_STENCIL].Renderbuffer;
+ const struct intel_renderbuffer *dst_irb = intel_renderbuffer(draw_rb);
struct intel_mipmap_tree *dst_mt = dst_irb->mt;
if (!dst_mt)
@@ -478,7 +480,7 @@ brw_meta_fbo_stencil_blit(struct brw_context *brw,
dst_mt = dst_mt->stencil_mt;
bool mirror_x, mirror_y;
- if (brw_meta_mirror_clip_and_scissor(ctx,
+ if (brw_meta_mirror_clip_and_scissor(ctx, read_fb, draw_fb,
&src_x0, &src_y0, &src_x1, &src_y1,
&dst_x0, &dst_y0, &dst_x1, &dst_y1,
&mirror_x, &mirror_y))