Mesa (main): freedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 4 19:33:12 UTC 2021
Module: Mesa
Branch: main
Commit: 0e4fcda7e0df9218e1b5e63d5789099cf87fb62a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e4fcda7e0df9218e1b5e63d5789099cf87fb62a
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>
---
src/freedreno/ci/freedreno-a630-fails.txt | 1 -
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 4 ++++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt
index e4c4ea97ff3..4eeb5fe7382 100644
--- a/src/freedreno/ci/freedreno-a630-fails.txt
+++ b/src/freedreno/ci/freedreno-a630-fails.txt
@@ -246,7 +246,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 cc6d6d59968..d9be8218713 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
@@ -1138,6 +1138,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 = util_format_snorm_to_unorm(info->src.format);
More information about the mesa-commit
mailing list