freedreno/a6xx/vsc: Be more tolerate of degenerate prims

Before we drop u_trim_pipe_prim(), we need to be more tolerant of the
edge cases it was protecting us from.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
This commit is contained in:
Rob Clark 2021-03-15 14:40:48 -07:00
parent 4e82c5da73
commit 9947f950fb
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ prim_count(const struct pipe_draw_info *info,
/* PIPE_PRIM_MAX used internally for RECTLIST blits on 3d pipe: */
unsigned vtx_per_prim = (info->mode == PIPE_PRIM_MAX) ? 2 :
u_vertices_per_prim(info->mode);
return (draw->count * info->instance_count) / vtx_per_prim;
return MAX2(1, (draw->count * info->instance_count) / vtx_per_prim);
}
/**