nvk: use hardware limits for maxComputeSharedMemorySize

It doesn't change the reported values, but it will allow us to easily
advertise real hardware limits in the future.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37135>
This commit is contained in:
Karol Herbst 2025-09-02 12:53:46 +02:00 committed by Marge Bot
parent 1d5a1b11db
commit a0131b53ad

View file

@ -811,7 +811,13 @@ nvk_get_device_properties(const struct nvk_instance *instance,
.maxFragmentOutputAttachments = NVK_MAX_RTS,
.maxFragmentDualSrcAttachments = 1,
.maxFragmentCombinedOutputResources = 16,
.maxComputeSharedMemorySize = NVK_MAX_SHARED_SIZE,
/* Nvidia limits this to 48kB for consistency reasons, we could lift the
* limit if we wanted to.
*/
.maxComputeSharedMemorySize = MIN2(
NVK_MAX_SHARED_SIZE,
info->sm_smem_sizes_kB[info->sm_smem_size_count - 1] * 1024
),
.maxComputeWorkGroupCount = {0x7fffffff, 65535, 65535},
.maxComputeWorkGroupInvocations = 1024,
.maxComputeWorkGroupSize = {1024, 1024, 64},