freedreno: introduce color format parameter to emit_blit_buffer_dst

Useful for followup clear_buffer implementation.

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30284>
This commit is contained in:
David Heidelberg
2024-07-19 19:06:10 -07:00
parent 635a40cc5c
commit ddfb8ebf8c

View File

@@ -352,11 +352,11 @@ emit_blit_setup(struct fd_ringbuffer *ring, enum pipe_format pfmt,
static void
emit_blit_buffer_dst(struct fd_ringbuffer *ring, struct fd_resource *dst,
unsigned off, unsigned size)
unsigned off, unsigned size, a6xx_format color_format)
{
OUT_REG(ring,
A6XX_RB_2D_DST_INFO(
.color_format = FMT6_8_UNORM,
.color_format = color_format,
.tile_mode = TILE6_LINEAR,
.color_swap = WZYX,
),
@@ -466,7 +466,7 @@ emit_blit_buffer(struct fd_context *ctx, struct fd_ringbuffer *ring,
/*
* Emit destination:
*/
emit_blit_buffer_dst(ring, dst, doff, p);
emit_blit_buffer_dst(ring, dst, doff, p, FMT6_8_UNORM);
/*
* Blit command:
@@ -538,7 +538,7 @@ fd6_clear_ubwc(struct fd_batch *batch, struct fd_resource *rsc) assert_dt
/*
* Emit destination:
*/
emit_blit_buffer_dst(ring, rsc, offset, p);
emit_blit_buffer_dst(ring, rsc, offset, p, FMT6_8_UNORM);
/*
* Blit command: