Mesa (master): radeonsi: iterate from draw 1 for total/min_direct_count computation
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 22 17:04:11 UTC 2021
Module: Mesa
Branch: master
Commit: 67c2921193ec71a902b4b1a8bed2465f45b348a1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=67c2921193ec71a902b4b1a8bed2465f45b348a1
Author: Marek Olšák <marek.olsak at amd.com>
Date: Sun Jan 17 18:48:09 2021 -0500
radeonsi: iterate from draw 1 for total/min_direct_count computation
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
---
src/gallium/drivers/radeonsi/si_state_draw.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index e7385a88536..f7360e68ff1 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -1837,8 +1837,9 @@ static void si_draw_vbo(struct pipe_context *ctx,
}
}
} else {
- min_direct_count = num_draws ? UINT_MAX : 0;
- for (unsigned i = 0; i < num_draws; i++) {
+ total_direct_count = min_direct_count = draws[0].count;
+
+ for (unsigned i = 1; i < num_draws; i++) {
unsigned count = draws[i].count;
total_direct_count += count;
More information about the mesa-commit
mailing list