Module: Mesa
Branch: master
Commit: 067cb2f165c3363957aa4206461829a8e53abd32
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=067cb2f165c3363957aa4206461829a8e53abd32

Author: Ian Romanick <[email protected]>
Date:   Mon Jun 19 11:10:38 2017 -0700

i965: Assert that blorp always handles color blits

Reviewed-by: Paulo Zanoni <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>

---

 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,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to