Mesa (master): a5xx: fix border colors for swizzled texture formats
Ilia Mirkin
imirkin at kemper.freedesktop.org
Sun Jul 9 01:18:09 UTC 2017
Module: Mesa
Branch: master
Commit: a9b58a00bb473e8a11f8eb50528a40fb28857b4d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9b58a00bb473e8a11f8eb50528a40fb28857b4d
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat Jul 8 08:46:02 2017 -0400
a5xx: fix border colors for swizzled texture formats
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
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 a018bb6996..308c28fffc 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;
}
}
More information about the mesa-commit
mailing list