[Mesa-dev] [PATCH] i965: disable blorp's linear filtering on SNB

Samuel Iglesias Gonsalvez siglesias at igalia.com
Thu Mar 27 01:29:05 PDT 2014


Commit 079bdba05f870807d3ed77fa3093cdb7727aa2fd enabled the use of BLORP
engine for single sample scaled blit with bilinear filter.

However piglit fails when running fbo-blit-stretch test on SandyBridge.
This patch makes the code to fallback to other blit paths for SandyBridge.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68365

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
---
 src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 9e80935..a0a9a7b 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -251,6 +251,15 @@ try_blorp_blit(struct brw_context *brw,
    fixup_mirroring(mirror_y, srcY0, srcY1);
    fixup_mirroring(mirror_y, dstY0, dstY1);
 
+   /* Linear filtering using blorp engine is failing on Sandybridge. So, fallback
+    * to other blit paths.
+    * See https://bugs.freedesktop.org/show_bug.cgi?id=68365
+    */
+   if ((brw->gen == 6) && (srcX1 - srcX0 != dstX1 - dstX0 ||
+                           srcY1 - srcY0 != dstY1 - dstY0) &&
+       filter == GL_LINEAR)
+	   return false;
+
    /* If the destination rectangle needs to be clipped or scissored, do so.
     */
    if (!(clip_or_scissor(mirror_x, srcX0, srcX1, dstX0, dstX1,
-- 
1.9.0



More information about the mesa-dev mailing list