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:
@@ -315,10 +315,12 @@ static unsigned si_num_prims_for_vertices(const struct pipe_draw_info *info)
|
|||||||
switch (info->mode) {
|
switch (info->mode) {
|
||||||
case PIPE_PRIM_PATCHES:
|
case PIPE_PRIM_PATCHES:
|
||||||
return info->count / info->vertices_per_patch;
|
return info->count / info->vertices_per_patch;
|
||||||
|
case PIPE_PRIM_POLYGON:
|
||||||
|
return info->count >= 3;
|
||||||
case SI_PRIM_RECTANGLE_LIST:
|
case SI_PRIM_RECTANGLE_LIST:
|
||||||
return info->count / 3;
|
return info->count / 3;
|
||||||
default:
|
default:
|
||||||
return u_prims_for_vertices(info->mode, info->count);
|
return u_decomposed_prims_for_vertices(info->mode, info->count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user