mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
st/mesa: simplify prepare_indexed_draw
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20287>
This commit is contained in:
parent
8bcdcc8b23
commit
124d2762db
1 changed files with 7 additions and 9 deletions
|
|
@ -117,16 +117,14 @@ prepare_indexed_draw(/* pass both st and ctx to reduce dereferences */
|
|||
const struct pipe_draw_start_count_bias *draws,
|
||||
unsigned num_draws)
|
||||
{
|
||||
if (info->index_size) {
|
||||
/* Get index bounds for user buffers. */
|
||||
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;
|
||||
/* Get index bounds for user buffers. */
|
||||
if (info->index_size && !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;
|
||||
|
||||
info->index_bounds_valid = true;
|
||||
}
|
||||
info->index_bounds_valid = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue