projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbdc00a
)
panfrost: don't use index_bias if not indexed
author
Marek Olšák
<marek.olsak@amd.com>
Sun, 22 Nov 2020 03:21:26 +0000
(22:21 -0500)
committer
Marek Olšák
<marek.olsak@amd.com>
Tue, 5 Jan 2021 00:22:33 +0000
(19:22 -0500)
index_bias is undefined if index_size == 0.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7679>
src/gallium/drivers/panfrost/pan_context.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/panfrost/pan_context.c
b/src/gallium/drivers/panfrost/pan_context.c
index
66523bc
..
61838df
100644
(file)
--- a/
src/gallium/drivers/panfrost/pan_context.c
+++ b/
src/gallium/drivers/panfrost/pan_context.c
@@
-518,7
+518,7
@@
panfrost_draw_vbo(
panfrost_batch_set_requirements(batch);
/* Take into account a negative bias */
- ctx->vertex_count = draws[0].count +
abs(info->index_bias
);
+ ctx->vertex_count = draws[0].count +
(info->index_size ? abs(info->index_bias) : 0
);
ctx->instance_count = info->instance_count;
ctx->active_prim = info->mode;