panfrost: consider xfb shader when calculating thread local storage size
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Register spilling can cause us to require thread local storage (tls).
However, we were not adjusting the tls stack size space to account for
the tls needed for the extra xfb shader when transform feedback is
needed. We noticed this when testing register allocation in the
OpenGL CTS (for testing we had forced spilling where none happened
before).

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33935>
This commit is contained in:
Eric R. Smith 2025-03-06 20:44:04 -04:00 committed by Marge Bot
parent ed72d97d48
commit 2ee3bef252

View file

@ -789,11 +789,12 @@ panfrost_batch_adjust_stack_size(struct panfrost_batch *batch)
for (unsigned i = 0; i < PIPE_SHADER_TYPES; ++i) {
struct panfrost_compiled_shader *ss = ctx->prog[i];
struct panfrost_compiled_shader *xfb_ss =
ctx->uncompiled[i] ? ctx->uncompiled[i]->xfb : NULL;
if (!ss)
continue;
batch->stack_size = MAX2(batch->stack_size, ss->info.tls_size);
batch->stack_size = MAX3(batch->stack_size,
ss ? ss->info.tls_size : 0,
xfb_ss ? xfb_ss->info.tls_size : 0);
}
}