radv: fix expected disk cache size for meta shaders

Math can go wrong.

If the disk cache size is too small, buckets are evicted and this
might cause stuttering when starting applications.

Fixes: 4fc856af98 ("radv: fix caching on-demand meta shaders")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13930
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37718>
This commit is contained in:
Samuel Pitoiset 2025-10-06 17:43:43 +02:00 committed by Marge Bot
parent dfa8ac6b91
commit c177bf81b4

View file

@ -2438,7 +2438,8 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
mesa_bytes_to_hex(buf, pdev->cache_uuid, VK_UUID_SIZE);
pdev->vk.disk_cache = disk_cache_create(pdev->name, buf, 0);
pdev->disk_cache_meta = disk_cache_create_custom(pdev->name, buf, 0, "radv_builtin_shaders", 1024 * 32 /* 32MiB */);
pdev->disk_cache_meta =
disk_cache_create_custom(pdev->name, buf, 0, "radv_builtin_shaders", 1024 * 1024 * 32 /* 32MiB */);
radv_get_physical_device_properties(pdev);