diff options
author | Emma Anholt <emma@anholt.net> | 2021-11-17 16:04:45 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2021-11-19 17:24:11 +0000 |
commit | cad0b6e2e58cc9f74c91461b3e717ac4e86085d5 (patch) | |
tree | e3fd56284f91807aed2f84ee61474ada3e73e7ff /src | |
parent | 93eb697a8da184feb2b1f15a14235087f60f8ec9 (diff) | |
download | mesa-cad0b6e2e58cc9f74c91461b3e717ac4e86085d5.tar.gz |
freedreno/a6xx: Disable sample averaging on non-ubwc z24s8 MSAA blits.
The fallback path we averages unorm textures, but if we don't have ubwc on
either then we can just cast them to uint which then just takes sample 0.
The proper UBWC format I think ends up averaging, though.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13867>
Diffstat (limited to 'src')
-rw-r--r-- | src/freedreno/ci/freedreno-a630-fails.txt | 15 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 15 |
2 files changed, 10 insertions, 20 deletions
diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt index d6505d78433..9d6bc2b3d5a 100644 --- a/src/freedreno/ci/freedreno-a630-fails.txt +++ b/src/freedreno/ci/freedreno-a630-fails.txt @@ -262,21 +262,6 @@ spec@egl_khr_surfaceless_context@viewport,Fail spec@egl_mesa_configless_context@basic,Fail spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail -# "MESA: warning: sample averaging on fallback z24s8 blit when we shouldn't." -# on glBlitFramebuffer() from the MSAA FB to non-MSAA. -spec@ext_framebuffer_multisample@accuracy 2 depth_resolve depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy 2 depth_resolve small depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy 2 stencil_resolve depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy 2 stencil_resolve small depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy 4 depth_resolve depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy 4 depth_resolve small depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy 4 stencil_resolve depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy 4 stencil_resolve small depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy all_samples depth_resolve depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy all_samples depth_resolve small depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy all_samples stencil_resolve depthstencil,Fail -spec@ext_framebuffer_multisample@accuracy all_samples stencil_resolve small depthstencil,Fail - spec@ext_framebuffer_multisample@alpha-to-coverage-dual-src-blend 2,Fail spec@ext_framebuffer_multisample@alpha-to-coverage-dual-src-blend 4,Fail spec@ext_framebuffer_multisample@alpha-to-coverage-no-draw-buffer-zero 2,Fail diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c index 3feb8f729b9..ed81becd860 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c @@ -1071,12 +1071,17 @@ handle_zs_blit(struct fd_context *ctx, * 8888_unorm. */ if (!ctx->screen->info->a6xx.has_z24uint_s8uint) { - if (!src->layout.ubwc) - blit.src.format = PIPE_FORMAT_RGBA8888_UNORM; - if (!dst->layout.ubwc) - blit.dst.format = PIPE_FORMAT_RGBA8888_UNORM; + if (!src->layout.ubwc && !dst->layout.ubwc) { + blit.src.format = PIPE_FORMAT_RGBA8888_UINT; + blit.dst.format = PIPE_FORMAT_RGBA8888_UINT; + } else { + if (!src->layout.ubwc) + blit.src.format = PIPE_FORMAT_RGBA8888_UNORM; + if (!dst->layout.ubwc) + blit.dst.format = PIPE_FORMAT_RGBA8888_UNORM; + } } - if (info->src.resource->nr_samples > 1) + if (info->src.resource->nr_samples > 1 && blit.src.format != PIPE_FORMAT_RGBA8888_UINT) mesa_logw("sample averaging on fallback z24s8 blit when we shouldn't."); return fd_blitter_blit(ctx, &blit); |