mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
panfrost: consider xfb shader when calculating thread local storage size
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:
parent
ed72d97d48
commit
2ee3bef252
1 changed files with 5 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue