projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54bc874
)
radeonsi: use u_decomposed_prims_for_vertices instead of u_prims_for_vertices
author
Marek Olšák
<marek.olsak@amd.com>
Sat, 10 Nov 2018 03:27:05 +0000
(22:27 -0500)
committer
Marek Olšák
<marek.olsak@amd.com>
Wed, 2 Jan 2019 20:01:56 +0000
(15:01 -0500)
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>
src/gallium/drivers/radeonsi/si_state_draw.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/radeonsi/si_state_draw.c
b/src/gallium/drivers/radeonsi/si_state_draw.c
index 6454491457bb191113a672c33319e72bba64770a..d0b2e18b4ea7b01adc9bea193d1e10c05c38866d 100644
(file)
--- a/
src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/
src/gallium/drivers/radeonsi/si_state_draw.c
@@
-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);
}
}