Mesa (main): freedreno/a6xx: Use fd6_pipe2tex() for the 2D src format.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 5 20:44:49 UTC 2021
Module: Mesa
Branch: main
Commit: 4d6f5cd57282f5af28ac47193810d7a03c4be073
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d6f5cd57282f5af28ac47193810d7a03c4be073
Author: Emma Anholt <emma at anholt.net>
Date: Fri Oct 1 16:41:39 2021 -0700
freedreno/a6xx: Use fd6_pipe2tex() for the 2D src format.
The differences between the two are:
- tex supports more formats (fine, we've already decided on which formats
we can blit)
- FMT6_10_10_10_2_UNORM instead of FMT6_10_10_10_2_UNORM_DEST.
- FMT6_A8_UNORM for PIPE_FORMAT_A8_UNORM.
For 1555 support we get another difference between tex and color, and we
need 2/3 of the tex differences for blit srcs, so switch it over. This
also matches what turnip does (except it doesn't have A8 as a format).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
---
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
index c7d893c14f0..dc79c7f5a94 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
@@ -571,7 +571,7 @@ emit_blit_src(struct fd_ringbuffer *ring, const struct pipe_blit_info *info,
unsigned layer, unsigned nr_samples)
{
struct fd_resource *src = fd_resource(info->src.resource);
- enum a6xx_format sfmt = fd6_pipe2color(info->src.format);
+ enum a6xx_format sfmt = fd6_pipe2tex(info->src.format);
enum a6xx_tile_mode stile =
fd_resource_tile_mode(info->src.resource, info->src.level);
enum a3xx_color_swap sswap = fd6_resource_swap(src, info->src.format);
@@ -587,8 +587,8 @@ emit_blit_src(struct fd_ringbuffer *ring, const struct pipe_blit_info *info,
enum a3xx_msaa_samples samples = fd_msaa_samples(src->b.b.nr_samples);
- if (sfmt == FMT6_10_10_10_2_UNORM_DEST)
- sfmt = FMT6_10_10_10_2_UNORM;
+ if (info->src.format == PIPE_FORMAT_A8_UNORM)
+ sfmt = FMT6_A8_UNORM;
OUT_PKT4(ring, REG_A6XX_SP_PS_2D_SRC_INFO, 10);
OUT_RING(ring, A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT(sfmt) |
More information about the mesa-commit
mailing list