Mesa (main): util/draw: fix indirect draw count readback
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 21 02:57:26 UTC 2022
Module: Mesa
Branch: main
Commit: ec124916206fbae63ee9e3c2c73de8255c807c98
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec124916206fbae63ee9e3c2c73de8255c807c98
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue Apr 19 16:06:44 2022 -0400
util/draw: fix indirect draw count readback
if there is an indirect count, always use it
Fixes: 3eb99323172 ("aux/draw: add a util function for reading back indirect draw params")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15963>
---
src/gallium/auxiliary/util/u_draw.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_draw.c b/src/gallium/auxiliary/util/u_draw.c
index 273724f2a0a..ed1e294a556 100644
--- a/src/gallium/auxiliary/util/u_draw.c
+++ b/src/gallium/auxiliary/util/u_draw.c
@@ -150,8 +150,7 @@ util_draw_indirect_read(struct pipe_context *pipe,
debug_printf("%s: failed to map indirect draw count buffer\n", __FUNCTION__);
return NULL;
}
- if (dc_param[0] < draw_count)
- draw_count = dc_param[0];
+ draw_count = dc_param[0];
pipe_buffer_unmap(pipe, dc_transfer);
}
if (!draw_count) {
More information about the mesa-commit
mailing list