mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
util/prim_restart: store index bounds while rewriting draws
may as well Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10966>
This commit is contained in:
parent
69d47fdd7a
commit
aee78a3504
1 changed files with 4 additions and 1 deletions
|
|
@ -177,6 +177,7 @@ struct range {
|
|||
struct range_info {
|
||||
struct range *ranges;
|
||||
unsigned count, max;
|
||||
unsigned min_index, max_index;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -209,6 +210,8 @@ add_range(enum pipe_prim_type mode, struct range_info *info, unsigned start, uns
|
|||
|
||||
info->max *= 2;
|
||||
}
|
||||
info->min_index = MIN2(info->min_index, start);
|
||||
info->max_index = MAX2(info->max_index, start + count - 1);
|
||||
|
||||
/* save the range */
|
||||
info->ranges[info->count].start = start;
|
||||
|
|
@ -233,7 +236,7 @@ util_draw_vbo_without_prim_restart(struct pipe_context *context,
|
|||
const struct pipe_draw_start_count_bias *draw)
|
||||
{
|
||||
const void *src_map;
|
||||
struct range_info ranges = {0};
|
||||
struct range_info ranges = { .min_index = UINT32_MAX, 0 };
|
||||
struct pipe_draw_info new_info;
|
||||
struct pipe_draw_start_count_bias new_draw;
|
||||
struct pipe_transfer *src_transfer = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue