From a9b58a00bb473e8a11f8eb50528a40fb28857b4d Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 8 Jul 2017 08:46:02 -0400 Subject: [PATCH] a5xx: fix border colors for swizzled texture formats Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c index a018bb69960..308c28fffc4 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c @@ -212,21 +212,21 @@ setup_border_colors(struct fd_texture_stateobj *tex, struct bcolor_entry *entrie continue; if (desc->channel[c].pure_integer) { - e->fp32[j] = bc->ui[c]; - e->fp16[j] = bc->ui[c]; - e->ui16[j] = bc->ui[c]; - e->si16[j] = bc->i[c]; - e->ui8[j] = bc->ui[c]; - e->si8[j] = bc->i[c]; + e->fp32[c] = bc->ui[j]; + e->fp16[c] = bc->ui[j]; + e->ui16[c] = bc->ui[j]; + e->si16[c] = bc->i[j]; + e->ui8[c] = bc->ui[j]; + e->si8[c] = bc->i[j]; } else { - float f = bc->f[c]; - - e->fp32[j] = fui(f); - e->fp16[j] = util_float_to_half(f); - e->ui16[j] = f * 65535.0; - e->si16[j] = f * 32767.5; - e->ui8[j] = f * 255.0; - e->si8[j] = f * 128.0; + float f = bc->f[j]; + + e->fp32[c] = fui(f); + e->fp16[c] = util_float_to_half(f); + e->ui16[c] = f * 65535.0; + e->si16[c] = f * 32767.5; + e->ui8[c] = f * 255.0; + e->si8[c] = f * 128.0; } } -- 2.30.2