Mesa (master): i965/blit: Remove a bogus assertion

Jason Ekstrand jekstrand at kemper.freedesktop.org
Thu Oct 27 21:45:41 UTC 2016


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Mon Oct 24 14:27:32 2016 -0700

i965/blit: Remove a bogus assertion

This assertion, while valid for linear buffers, doesn't work properly for
tiled memory.  It used to work most of the time because the offset provided
was always to the left-hand edge of the image.  However, if you use a byte
offset to get to the inside of the image, the height * stride calculation
may actually end up being too large.

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>

---

 src/mesa/drivers/dri/i965/intel_blit.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index b7a9cc9..bc97e66 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -585,10 +585,6 @@ intelEmitCopyBlit(struct brw_context *brw,
 
    assert(dst_x < dst_x2);
    assert(dst_y < dst_y2);
-   assert(src_offset + (src_y + h - 1) * abs(src_pitch) +
-          (w * cpp) <= src_buffer->size);
-   assert(dst_offset + (dst_y + h - 1) * abs(dst_pitch) +
-          (w * cpp) <= dst_buffer->size);
 
    BEGIN_BATCH_BLT_TILED(length, dst_y_tiled, src_y_tiled);
    OUT_BATCH(CMD | (length - 2));




More information about the mesa-commit mailing list