aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_draw.c
diff options
context:
space:
mode:
authorErico Nunes <[email protected]>2019-12-07 04:38:03 +0100
committerErico Nunes <[email protected]>2019-12-14 07:44:43 +0100
commit8bf2b5db786b8608ddd7c83fffa695ae011bf6b3 (patch)
treef71cb27c5e05fd2441fc826236d67cb1db407a69 /src/gallium/drivers/freedreno/freedreno_draw.c
parent9fb45c5bbd11fa54c0777021a236114e414207f8 (diff)
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2445>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c2
1 files changed, 1 insertions, 1 deletions
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;