mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 09:48:07 +02:00
pan/mdg: fix LOCAL_STORAGE wls_instances packing
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7315>
This commit is contained in:
parent
e4b170a720
commit
e5cd5e9cec
1 changed files with 6 additions and 6 deletions
|
|
@ -953,12 +953,12 @@ panfrost_emit_shared_memory(struct panfrost_batch *batch,
|
|||
unsigned single_size = util_next_power_of_two(MAX2(ss->shared_size,
|
||||
128));
|
||||
|
||||
unsigned log2_instances =
|
||||
util_logbase2_ceil(info->grid[0]) +
|
||||
util_logbase2_ceil(info->grid[1]) +
|
||||
util_logbase2_ceil(info->grid[2]);
|
||||
unsigned instances =
|
||||
util_next_power_of_two(info->grid[0]) *
|
||||
util_next_power_of_two(info->grid[1]) *
|
||||
util_next_power_of_two(info->grid[2]);
|
||||
|
||||
unsigned shared_size = single_size * (1 << log2_instances) * dev->core_count;
|
||||
unsigned shared_size = single_size * instances * dev->core_count;
|
||||
struct panfrost_bo *bo = panfrost_batch_get_shared_memory(batch,
|
||||
shared_size,
|
||||
1);
|
||||
|
|
@ -969,7 +969,7 @@ panfrost_emit_shared_memory(struct panfrost_batch *batch,
|
|||
|
||||
pan_pack(t.cpu, LOCAL_STORAGE, ls) {
|
||||
ls.wls_base_pointer = bo->ptr.gpu;
|
||||
ls.wls_instances = log2_instances;
|
||||
ls.wls_instances = instances;
|
||||
ls.wls_size_scale = util_logbase2(single_size) + 1;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue