From 3bd5968b5c25980fc59655a0a532c6bab1991872 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Fri, 20 Jan 2023 11:33:16 +0100 Subject: [PATCH] freedreno: set alignment to next POT MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rohan Garg Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c index 5886645..e0335be 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c @@ -310,8 +310,10 @@ emit_border_color(struct fd_context *ctx, struct fd_ringbuffer *ring) assert_dt STATIC_ASSERT(sizeof(struct bcolor_entry) == FD5_BORDER_COLOR_SIZE); + const unsigned int alignment = + util_next_power_of_two(FD5_BORDER_COLOR_UPLOAD_SIZE); u_upload_alloc(fd5_ctx->border_color_uploader, 0, - FD5_BORDER_COLOR_UPLOAD_SIZE, FD5_BORDER_COLOR_UPLOAD_SIZE, + FD5_BORDER_COLOR_UPLOAD_SIZE, alignment, &off, &fd5_ctx->border_color_buf, &ptr); entries = ptr; -- 2.7.4