Mesa (staging/21.3): freedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Nov 7 13:39:51 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: 518063bd1b794958a9111f2bbcc07e5cfd3bed97
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=518063bd1b794958a9111f2bbcc07e5cfd3bed97

Author: Emma Anholt <emma at anholt.net>
Date:   Wed Nov  3 15:59:52 2021 -0700

freedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.

Since we're casting to unorm, the linear filtering will give bad results.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13666>
(cherry picked from commit 0e4fcda7e0df9218e1b5e63d5789099cf87fb62a)

---

 .pick_status.json                                | 2 +-
 src/freedreno/ci/freedreno-a630-fails.txt        | 1 -
 src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 4 ++++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index ffda743456c..4822e8420e5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -76,7 +76,7 @@
         "description": "freedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt
index 4debb67db3f..a8d2ba6f9eb 100644
--- a/src/freedreno/ci/freedreno-a630-fails.txt
+++ b/src/freedreno/ci/freedreno-a630-fails.txt
@@ -265,7 +265,6 @@ spec at arb_texture_rg@texwrap formats-int bordercolor-swizzled at GL_RG32UI- swizzled
 spec at arb_texture_rg@texwrap formats-int bordercolor-swizzled at GL_RG8I- swizzled- border color only,Fail
 spec at arb_texture_rg@texwrap formats-int bordercolor-swizzled at GL_RG8UI- swizzled- border color only,Fail
 
-spec at arb_texture_view@mipgen,Fail
 spec at arb_texture_view@rendering-layers-image,Fail
 spec at arb_texture_view@rendering-layers-image at layers rendering of image1DArray,Fail
 spec at arb_timer_query@timestamp-get,Fail
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
index 6285f4683b8..7710cd5265f 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
@@ -1167,6 +1167,10 @@ handle_snorm_copy_blit(struct fd_context *ctx,
                        const struct pipe_blit_info *info)
    assert_dt
 {
+   /* If we're interpolating the pixels, we can't just treat the values as unorm. */
+   if (info->filter == PIPE_TEX_FILTER_LINEAR)
+      return false;
+
    struct pipe_blit_info blit = *info;
 
    blit.src.format = blit.dst.format = snorm_copy_format(info->src.format);



More information about the mesa-commit mailing list