From 8bf2b5db786b8608ddd7c83fffa695ae011bf6b3 Mon Sep 17 00:00:00 2001 From: Erico Nunes Date: Sat, 7 Dec 2019 04:38:03 +0100 Subject: gallium/util: add alignment parameter to util_upload_index_buffer At least on Mali Utgard, index buffers need to be aligned on 0x40. To avoid duplicating this, add an alignment parameter. Keep the previous default for the other existing users. Signed-off-by: Erico Nunes Reviewed-by: Eric Anholt Part-of: --- src/gallium/drivers/freedreno/freedreno_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c') diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index c1e0afad7e9..a4724221b12 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -101,7 +101,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) struct pipe_draw_info new_info; if (info->index_size) { if (info->has_user_indices) { - if (!util_upload_index_buffer(pctx, info, &indexbuf, &index_offset)) + if (!util_upload_index_buffer(pctx, info, &indexbuf, &index_offset, 4)) return; new_info = *info; new_info.index.resource = indexbuf; -- cgit v1.2.3