panfrost: Allocate shared memory in OpenCL

In OpenCL, we can have no shader-defined shared memory but some dispatch-time
variable memory. This is not reflected in ss->info.wls_size, so check the right
variable instead so we allocate the appropriate memory.

Fixes page faults accessing shared memory with Rusticl, e.g. in the vstore_local
test.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22228>
This commit is contained in:
Alyssa Rosenzweig 2023-03-30 18:09:34 -04:00 committed by Marge Bot
parent 2f2738dc90
commit de01ae120d

View file

@ -1604,7 +1604,7 @@ panfrost_emit_shared_memory(struct panfrost_batch *batch,
info.tls.ptr = bo->ptr.gpu;
}
if (ss->info.wls_size) {
if (info.wls.size) {
unsigned size = pan_wls_adjust_size(info.wls.size) * info.wls.instances *
dev->core_id_range;