diff options
author | Italo Nicola <italonicola@collabora.com> | 2020-10-26 13:46:52 +0000 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-10-27 07:43:35 +0000 |
commit | e5cd5e9cec9112a71007b88220178afadb6c0133 (patch) | |
tree | 077a422e6fdc959522a62932d6d46dad49425c78 /src | |
parent | e4b170a72062e0648ca87a847975717600c20e6b (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_cmdstream.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 83234bdee90..6345d8d7ec7 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -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; }; |