mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
panfrost: Set TLS for compute jobs
Fixes CL programs using scratch storage, such as the Piglit test i32-stack-array.cl. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
This commit is contained in:
parent
3f7e7495fc
commit
7258b4b48d
1 changed files with 13 additions and 0 deletions
|
|
@ -1048,6 +1048,19 @@ panfrost_emit_shared_memory(struct panfrost_batch *batch,
|
|||
ls.wls_base_pointer = bo->ptr.gpu;
|
||||
ls.wls_instances = instances;
|
||||
ls.wls_size_scale = util_logbase2(single_size) + 1;
|
||||
|
||||
if (ss->stack_size) {
|
||||
unsigned shift =
|
||||
panfrost_get_stack_shift(ss->stack_size);
|
||||
struct panfrost_bo *bo =
|
||||
panfrost_batch_get_scratchpad(batch,
|
||||
ss->stack_size,
|
||||
dev->thread_tls_alloc,
|
||||
dev->core_count);
|
||||
|
||||
ls.tls_size = shift;
|
||||
ls.tls_base_pointer = bo->ptr.gpu;
|
||||
}
|
||||
};
|
||||
|
||||
return t.gpu;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue