radeonsi: fix si_num_prims_for_vertices for PIPE_PRIM_POLYGON

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>
This commit is contained in:
Marek Olšák
2020-12-26 22:13:13 -05:00
committed by Marge Bot
parent 6682c1603c
commit c43d00dc91
@@ -341,7 +341,8 @@ static unsigned si_num_prims_for_vertices(enum pipe_prim_type prim,
case PIPE_PRIM_PATCHES:
return count / vertices_per_patch;
case PIPE_PRIM_POLYGON:
return count >= 3;
/* It's a triangle fan with different edge flags. */
return count >= 3 ? count - 2 : 0;
case SI_PRIM_RECTANGLE_LIST:
return count / 3;
default: