From cc5df4398a2ff1ef291dfd23fee72b0dc173b66d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 29 Mar 2021 14:11:28 -0700 Subject: [PATCH] freedreno/a5xx: Fix up border color pointers. We were forgetting to increment in the loop, but also it looks from blob dumps on Pixel 2 like all the pointers it emitted were shifted up by 3 compared to our xml, and that's the same shift that a6xx uses for its pointers. None of the tests seem to use more than one border-color-requiring texture, so it's hard to tell. Part-of: --- src/freedreno/registers/adreno/a5xx.xml | 2 +- src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedreno/registers/adreno/a5xx.xml b/src/freedreno/registers/adreno/a5xx.xml index aea009637aa..b340ee7b017 100644 --- a/src/freedreno/registers/adreno/a5xx.xml +++ b/src/freedreno/registers/adreno/a5xx.xml @@ -2882,7 +2882,7 @@ different border-color states per texture.. Looks something like: 0340: 3c003c00 3c003c00 00000000 00000000 00000000 00000000 00000000 00000000 --> - + diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c index dc04d427a66..8f41504e520 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c @@ -366,7 +366,7 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring, OUT_RING(ring, sampler->texsamp0); OUT_RING(ring, sampler->texsamp1); OUT_RING(ring, sampler->texsamp2 | - A5XX_TEX_SAMP_2_BCOLOR_OFFSET(bcolor_offset)); + A5XX_TEX_SAMP_2_BCOLOR_OFFSET(bcolor_offset + i)); OUT_RING(ring, sampler->texsamp3); needs_border |= sampler->needs_border;