lima: fix ppir spill stack allocation

The previous spill stack was fixed and too small, and caused instability
in programs requiring spilling for roughly more than one value.
This patch adds a dynamic calculation of the buffer size based on stack
utilization and switches it to a separate allocation at flush time that
will fit the shader that requires the largest buffer.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
This commit is contained in:
Erico Nunes
2019-08-23 06:34:36 +02:00
parent f58e0405b6
commit 27e7603c34
4 changed files with 25 additions and 9 deletions

View File

@@ -303,6 +303,8 @@ lima_update_fs_state(struct lima_context *ctx)
fs->shader = NULL;
}
ctx->pp_max_stack_size = MAX2(ctx->pp_max_stack_size, ctx->fs->stack_size);
return true;
}