mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-11 20:03:11 +00:00
[vulkan] Record resource memory size
It's useful mainly for information reports, but might be useful elsewhere.
This commit is contained in:
parent
1f27622309
commit
fa057cb121
3 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue