panfrost: correct first-tracking for signature

If we unconditionally assign false to first *before* we use it, it's
never true when used. Instead, let's assign it *both* at the end *and*
when continuing.

Fixes: 4da88060d0 ("panfrost: Skip blit shader labelling if the buffer has no space")
CID: 1476270
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28856>
This commit is contained in:
Erik Faye-Lund 2024-04-22 14:06:46 +02:00 committed by Marge Bot
parent f852f86a31
commit 9058d5ff62

View file

@ -491,10 +491,11 @@ pan_blitter_get_blit_shader(struct pan_blitter_cache *cache,
coord_comps = MAX2(coord_comps, (key->surfaces[i].dim ?: 3) +
(key->surfaces[i].array ? 1 : 0));
first = false;
if (sig_offset >= sizeof(sig))
if (sig_offset >= sizeof(sig)) {
first = false;
continue;
}
sig_offset +=
snprintf(sig + sig_offset, sizeof(sig) - sig_offset,
@ -502,6 +503,8 @@ pan_blitter_get_blit_shader(struct pan_blitter_cache *cache,
first ? "" : ",", gl_frag_result_name(key->surfaces[i].loc),
type_str, dim_str, key->surfaces[i].array ? "[]" : "",
key->surfaces[i].src_samples, key->surfaces[i].dst_samples);
first = false;
}
nir_builder b = nir_builder_init_simple_shader(