From 64a256c66a520c55acb48deab309f5b984b02ba0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 13 Mar 2023 07:41:33 -0400 Subject: [PATCH] aux/tc: fix initial rp info allocation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit this value is -1 by default, which means the initial allocation yields 9 info structs instead of 10 (though this has no bearing on functionality) Acked-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_threaded_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index c5029c6..a6e1637 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -121,7 +121,7 @@ static void tc_batch_renderpass_infos_resize(struct threaded_context *tc, struct tc_batch *batch) { unsigned size = batch->renderpass_infos.capacity; - unsigned cur_num = batch->renderpass_info_idx; + unsigned cur_num = MAX2(batch->renderpass_info_idx, 0); if (size / sizeof(struct tc_renderpass_info) > cur_num) return; -- 2.7.4