From 067cb2f165c3363957aa4206461829a8e53abd32 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 19 Jun 2017 11:10:38 -0700 Subject: [PATCH] i965: Assert that blorp always handles color blits Reviewed-by: Paulo Zanoni Reviewed-by: Jason Ekstrand Part-of: --- src/mesa/drivers/dri/i965/brw_blorp.c | 2 ++ src/mesa/drivers/dri/i965/intel_fbo.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index 00c34f72cfd..c2225b390fd 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -831,6 +831,8 @@ brw_blorp_framebuffer(struct brw_context *brw, } } + /* try_blorp_blit should always be successful for color blits. */ + assert(!(mask & GL_COLOR_BUFFER_BIT)); return mask; } diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 9f8fee9879c..b1f24d4d1d3 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -929,6 +929,9 @@ intel_blit_framebuffer(struct gl_context *ctx, if (mask == 0x0) return; + /* brw_blorp_framebuffer should always be successful for color blits. */ + assert(!(mask & GL_COLOR_BUFFER_BIT)); + mask = _mesa_meta_BlitFramebuffer(ctx, readFb, drawFb, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, -- 2.30.2