[Mesa-dev] [PATCH] i965: disable blorp's linear filtering on SNB
Anuj Phogat
anuj.phogat at gmail.com
Fri Mar 28 13:04:13 PDT 2014
On Thu, Mar 27, 2014 at 1:29 AM, Samuel Iglesias Gonsalvez
<siglesias at igalia.com> wrote:
> 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.
My thoughts:
- Yes, fbo-blit-stretch test passes on SNB with fallback blit paths. But similar
piglit tests fbo-blit-scaled-linear and fbo-attachments-blit-scaled-linear
continues to fail with small color differences with meta fallback. So, the
fallback helped one out of three linear scaled blit tests.
Note: Use git-89ccd11 to run other two tests. A later patch causes the tests
to assert fail on SNB.
- The meta fallback will possibly have some performance penalty and It will just
hide the linear filtering bug in blorp engine.
- Current output from blorp on SNB is little off from expected but still looks
visually correct. I would prefer a patch which fixes the issue in blorp.
Let's wait for more opinions on this.
>
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list