mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 00:40:09 +01:00
panfrost: Reserve an extra page for spilling
I'm not sure what this is for, but the blob does it and I'd rather not poke farther than needed into hardware-internal details. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3950>
This commit is contained in:
parent
f37cec3275
commit
40fd1f9da4
1 changed files with 6 additions and 3 deletions
|
|
@ -86,7 +86,8 @@ panfrost_get_stack_shift(unsigned stack_size)
|
|||
return util_logbase2_ceil(MAX2(stack_size, 256)) - 4;
|
||||
}
|
||||
|
||||
/* Computes the aligned stack size given the shift and thread count */
|
||||
/* Computes the aligned stack size given the shift and thread count. The blob
|
||||
* reserves an extra page, and since this is hardware-internal, we do too. */
|
||||
|
||||
unsigned
|
||||
panfrost_get_total_stack_size(
|
||||
|
|
@ -94,6 +95,8 @@ panfrost_get_total_stack_size(
|
|||
unsigned threads_per_core,
|
||||
unsigned core_count)
|
||||
{
|
||||
unsigned stack_size = 1 << (stack_shift + 4);
|
||||
return stack_size * threads_per_core * core_count;
|
||||
unsigned size_per_thread = MAX2(1 << (stack_shift + 4), 32);
|
||||
unsigned size = size_per_thread * threads_per_core * core_count;
|
||||
|
||||
return size + 4096;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue