Skip to content
Snippets Groups Projects
Commit 5d9d7059 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz :lifter: Committed by Dylan Baker
Browse files

util/draw: fix indirect draw count readback


if there is an indirect count, always use it

Fixes: 3eb99323 ("aux/draw: add a util function for reading back indirect draw params")

Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!15963>
(cherry picked from commit ec124916)
parent 93a264f7
No related branches found
No related tags found
No related merge requests found
......@@ -300,7 +300,7 @@
"description": "util/draw: fix indirect draw count readback",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"because_sha": "3eb99323172902d34c80782aaa2d110567749cd9"
},
{
......
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment