From be5e0cef31da563e06ebafe24d392947ae44e31d Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsalvez Date: Thu, 13 Mar 2014 09:39:44 +0100 Subject: [PATCH] i965: disable blorp's linear filtering on SNB 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 --- 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 acdc9c7..893fdee 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