summaryrefslogtreecommitdiff
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard_ra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index 04be27da50e..72c06ade683 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -1011,7 +1011,7 @@ mir_ra(compiler_context *ctx)
int iter_count = 1000; /* max iterations */
/* Number of 128-bit slots in memory we've spilled into */
- unsigned spill_count = 0;
+ unsigned spill_count = DIV_ROUND_UP(ctx->tls_size, 16);
mir_create_pipeline_registers(ctx);
@@ -1054,7 +1054,7 @@ mir_ra(compiler_context *ctx)
/* Report spilling information. spill_count is in 128-bit slots (vec4 x
* fp32), but tls_size is in bytes, so multiply by 16 */
- ctx->tls_size += spill_count * 16;
+ ctx->tls_size = spill_count * 16;
install_registers(ctx, l);