st/mesa: no need to check index_size in st_prepare_indexed_draw anymore

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26619>
This commit is contained in:
Marek Olšák 2023-12-07 15:05:24 -05:00 committed by Marge Bot
parent 4cd585ab50
commit c6281a6f26

View file

@ -118,9 +118,10 @@ st_prepare_indexed_draw(struct gl_context *ctx, struct pipe_draw_info *info,
{
struct st_context *st = ctx->st;
assert(info->index_size);
/* Get index bounds for user buffers. */
if (info->index_size && !info->index_bounds_valid &&
st->draw_needs_minmax_index) {
if (!info->index_bounds_valid && st->draw_needs_minmax_index) {
/* Return if this fails, which means all draws have count == 0. */
if (!vbo_get_minmax_indices_gallium(ctx, info, draws, num_draws))
return false;