diff options
author | Ilia Mirkin <[email protected]> | 2017-07-08 08:46:02 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2017-07-08 21:14:58 -0400 |
commit | a9b58a00bb473e8a11f8eb50528a40fb28857b4d (patch) | |
tree | 9739febec41f2064be91ceed5047a297413a6125 | |
parent | a4eeb0c403dc66af136428a5d44b74328e4db1e0 (diff) |
a5xx: fix border colors for swizzled texture formats
Signed-off-by: Ilia Mirkin <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 28 |
1 files 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; } } |