util/draw: fix indirect draw count readback

if there is an indirect count, always use it

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

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15963>
This commit is contained in:
Mike Blumenkrantz 2022-04-19 16:06:44 -04:00 committed by Marge Bot
parent 07437fa3bd
commit ec12491620

View file

@ -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) {