mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[vulkan] Plug some memory leaks
I still can't find the run-time leak. I suspect something that accumulates but gets freed on exit.
This commit is contained in:
parent
ef87baf339
commit
3823ea1858
3 changed files with 7 additions and 0 deletions
|
@ -484,6 +484,7 @@ Vulkan_BuildDisplayLists (model_t **models, int num_models, vulkan_ctx_t *ctx)
|
|||
vertex_index_base = 0;
|
||||
// holds all the polygon definitions: vertex indices + poly_count "end of
|
||||
// primitive" markers.
|
||||
free (bctx->polys);
|
||||
bctx->polys = malloc ((index_count + poly_count) * sizeof (uint32_t));
|
||||
|
||||
// All usable surfaces have been chained to the (base) texture they use.
|
||||
|
|
|
@ -357,6 +357,7 @@ Vulkan_Lighting_Init (vulkan_ctx_t *ctx)
|
|||
device->physDev->properties.limits.maxPerStageDescriptorSamplers);
|
||||
lframe->shadowWrite.pImageInfo = lframe->shadowInfo;
|
||||
}
|
||||
free (shadow_set);
|
||||
free (attach_set);
|
||||
free (lights_set);
|
||||
qfvPopDebug (ctx);
|
||||
|
|
|
@ -549,6 +549,9 @@ destroy_attachments (vulkan_ctx_t *ctx, qfv_renderpass_t *rp)
|
|||
dfunc->vkDestroyImage (device->dev, rp->attachment_images->a[i], 0);
|
||||
}
|
||||
dfunc->vkFreeMemory (device->dev, rp->attachmentMemory, 0);
|
||||
|
||||
free (rp->attachment_images);
|
||||
free (rp->attachment_views);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -591,6 +594,8 @@ Vulkan_DestroyRenderPasses (vulkan_ctx_t *ctx)
|
|||
destroy_renderframes (ctx, rp);
|
||||
destroy_framebuffers (ctx, rp);
|
||||
|
||||
DARRAY_CLEAR (&rp->frames);
|
||||
free (rp->clearValues);
|
||||
free (rp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue