mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-06 07:50:30 +01:00
radeonsi: use u_decomposed_prims_for_vertices instead of u_prims_for_vertices
It seems to be the same, but this doesn't use integer division with a variable divisor. Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
This commit is contained in:
parent
54bc87469a
commit
cba475b3e7
1 changed files with 3 additions and 1 deletions
|
|
@ -315,10 +315,12 @@ static unsigned si_num_prims_for_vertices(const struct pipe_draw_info *info)
|
|||
switch (info->mode) {
|
||||
case PIPE_PRIM_PATCHES:
|
||||
return info->count / info->vertices_per_patch;
|
||||
case PIPE_PRIM_POLYGON:
|
||||
return info->count >= 3;
|
||||
case SI_PRIM_RECTANGLE_LIST:
|
||||
return info->count / 3;
|
||||
default:
|
||||
return u_prims_for_vertices(info->mode, info->count);
|
||||
return u_decomposed_prims_for_vertices(info->mode, info->count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue