summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_draw.c')
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_draw.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_draw.c b/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_draw.c
index 579d1cdaf..eec4de98d 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_draw.c
+++ b/lib/mesa/src/gallium/drivers/freedreno/a5xx/fd5_draw.c
@@ -318,7 +318,13 @@ fd5_clear(struct fd_context *ctx, unsigned buffers,
break;
}
- util_pack_color_union(pfmt, &uc, &swapped);
+ if (util_format_is_pure_uint(pfmt)) {
+ util_format_write_4ui(pfmt, swapped.ui, 0, &uc, 0, 0, 0, 1, 1);
+ } else if (util_format_is_pure_sint(pfmt)) {
+ util_format_write_4i(pfmt, swapped.i, 0, &uc, 0, 0, 0, 1, 1);
+ } else {
+ util_pack_color(swapped.f, pfmt, &uc);
+ }
OUT_PKT4(ring, REG_A5XX_RB_BLIT_CNTL, 1);
OUT_RING(ring, A5XX_RB_BLIT_CNTL_BUF(BLIT_MRT0 + i));