diff --git a/include/QF/Vulkan/resource.h b/include/QF/Vulkan/resource.h index 4cc7c78c5..872b52787 100644 --- a/include/QF/Vulkan/resource.h +++ b/include/QF/Vulkan/resource.h @@ -59,6 +59,7 @@ typedef struct qfv_resource_s { unsigned num_objects; qfv_resobj_t *objects; VkDeviceMemory memory; + VkDeviceSize size; } qfv_resource_t; struct qfv_device_s; diff --git a/libs/video/renderer/vulkan/resource.c b/libs/video/renderer/vulkan/resource.c index 90451e5ef..4d9578ae0 100644 --- a/libs/video/renderer/vulkan/resource.c +++ b/libs/video/renderer/vulkan/resource.c @@ -129,6 +129,7 @@ QFV_CreateResource (qfv_device_t *device, qfv_resource_t *resource) } } } + resource->size = size; QFV_duSetObjectName (device, VK_OBJECT_TYPE_DEVICE_MEMORY, resource->memory, va (resource->va_ctx, "memory:%s", resource->name)); diff --git a/libs/video/renderer/vulkan/vulkan_lighting.c b/libs/video/renderer/vulkan/vulkan_lighting.c index 68ce564cf..a48047524 100644 --- a/libs/video/renderer/vulkan/vulkan_lighting.c +++ b/libs/video/renderer/vulkan/vulkan_lighting.c @@ -669,7 +669,6 @@ build_shadow_maps (lightingctx_t *lctx, vulkan_ctx_t *ctx) int numLayers = 0; int totalLayers = 0; int *imageMap = alloca (numLights * sizeof (int)); - size_t memsize = 0; int *lightMap = alloca (numLights * sizeof (int)); int numMaps = 0; mapdesc_t *maps = alloca (numLights * sizeof (mapdesc_t)); @@ -828,7 +827,8 @@ build_shadow_maps (lightingctx_t *lctx, vulkan_ctx_t *ctx) } Sys_MaskPrintf (SYS_vulkan, "shadow maps: %d layers in %zd images: %zd\n", - totalLayers, lctx->light_images.size, memsize); + totalLayers, lctx->light_images.size, + lctx->shadow_resources->size); } void