Skip to content

Instantly share code, notes, and snippets.

@anarsoul
Created December 30, 2019 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anarsoul/168aa6d1d2b30acfb1b2400e8eb71e90 to your computer and use it in GitHub Desktop.
Save anarsoul/168aa6d1d2b30acfb1b2400e8eb71e90 to your computer and use it in GitHub Desktop.
diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c
index 5b86cce4d0d..cb4a56506b5 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -846,8 +846,10 @@ lima_pack_plbu_cmd(struct lima_context *ctx, const struct pipe_draw_info *info)
PLBU_CMD_ARRAYS_SEMAPHORE_END();
- if (info->index_size)
- PLBU_CMD_DRAW_ELEMENTS(info->mode, ctx->min_index, info->count);
+ if (info->index_size) {
+ unsigned num = ctx->max_index - ctx->min_index + 1;
+ PLBU_CMD_DRAW_ELEMENTS(info->mode, ctx->min_index, num);
+ }
PLBU_CMD_END();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment