pan/bi: Pipe scratch_size in from NIR

Needs to be added to whatever we spill ourselves.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
This commit is contained in:
Alyssa Rosenzweig 2020-12-22 11:53:20 -05:00 committed by Marge Bot
parent 087ef91c85
commit f4d2b35ac8
2 changed files with 2 additions and 1 deletions

View file

@ -311,7 +311,7 @@ bi_register_allocate(bi_context *ctx)
unsigned iter_count = 1000; /* max iterations */
/* Number of bytes of memory we've spilled into */
unsigned spill_count = 0;
unsigned spill_count = ctx->tls_size;
do {
if (l) {

View file

@ -2213,6 +2213,7 @@ bifrost_compile_shader_nir(void *mem_ctx, nir_shader *nir,
program->sysval_count = ctx->sysvals.sysval_count;
memcpy(program->sysvals, ctx->sysvals.sysvals, sizeof(ctx->sysvals.sysvals[0]) * ctx->sysvals.sysval_count);
ctx->blend_types = program->blend_types;
ctx->tls_size = nir->scratch_size;
nir_foreach_function(func, nir) {
if (!func->impl)