From a9ff79a76a559e17fdde5bd3a6cb206f830d6c54 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 14 Dec 2023 09:54:33 +0900 Subject: [PATCH] [vulkan] Set shadow map size limit to 1024 Even that's getting pretty big, but with the quanta at 128, that's a maximum of 8 different image sizes (which is nice for my planned "staging image" idea). --- libs/video/renderer/vulkan/vulkan_lighting.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/video/renderer/vulkan/vulkan_lighting.c b/libs/video/renderer/vulkan/vulkan_lighting.c index 0dba3ddd3..37332d46e 100644 --- a/libs/video/renderer/vulkan/vulkan_lighting.c +++ b/libs/video/renderer/vulkan/vulkan_lighting.c @@ -1616,6 +1616,7 @@ allocate_map (mapctx_t *mctx, int type, int (*getsize) (const light_t *light)) continue; } int light_size = getsize (&mctx->lights[li]); + light_size = min (light_size, 1024); light_size = ((light_size + shadow_quanta - 1) / shadow_quanta) * shadow_quanta; if (size != light_size || numLayers + layers > mctx->maxLayers) {