panvk/jm: Apply direct dispatch WLS instance limit

Apply the direct dispatch WLS instance limit to PanVK/JM as well to keep
compute jobs with large workgroup counts from hitting
VK_ERROR_OUT_OF_DEVICE_MEMORY.

Fixes: 005703e5b5 ("panvk: Move TLS preparation logic to cmd_dispatch_prepare_tls"
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34979>
This commit is contained in:
Lars-Ivar Hesselberg Simonsen 2025-05-16 13:35:25 +02:00 committed by Marge Bot
parent 0a47a1cb6d
commit e6e406de0e

View file

@ -49,9 +49,10 @@ panvk_per_arch(cmd_dispatch_prepare_tls)(struct panvk_cmd_buffer *cmdbuf,
unsigned core_id_range;
pan_query_core_count(&phys_dev->kmod.props, &core_id_range);
batch->tlsinfo.wls.instances = pan_wls_instances(dim);
batch->wls_total_size = pan_wls_adjust_size(batch->tlsinfo.wls.size) *
batch->tlsinfo.wls.instances * core_id_range;
batch->tlsinfo.wls.instances = pan_calc_wls_instances(
&shader->cs.local_size, &phys_dev->kmod.props, indirect ? NULL : dim);
batch->wls_total_size = pan_calc_total_wls_size(
batch->tlsinfo.wls.size, batch->tlsinfo.wls.instances, core_id_range);
}
return batch->tls.gpu;