mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
[vulkan] Destroy pipeline on shutdown
This commit is contained in:
parent
5eb1afdcb3
commit
3b06ca01af
3 changed files with 15 additions and 0 deletions
|
@ -150,5 +150,7 @@ qfv_pipelineset_t *
|
|||
QFV_CreateComputePipelines (struct qfv_device_s *device,
|
||||
VkPipelineCache cache,
|
||||
qfv_computepipelinecreateinfoset_t *cpciSet);
|
||||
void
|
||||
QFV_DestroyPipeline (struct qfv_device_s *device, VkPipeline pipeline);
|
||||
|
||||
#endif//__QF_Vulkan_pipeline_h
|
||||
|
|
|
@ -153,3 +153,12 @@ QFV_CreateComputePipelines (qfv_device_t *device,
|
|||
pipelines->a);
|
||||
return pipelines;
|
||||
}
|
||||
|
||||
void
|
||||
QFV_DestroyPipeline (qfv_device_t *device, VkPipeline pipeline)
|
||||
{
|
||||
VkDevice dev = device->dev;
|
||||
qfv_devfuncs_t *dfunc = device->funcs;
|
||||
|
||||
dfunc->vkDestroyPipeline (dev, pipeline, 0);
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#include "QF/Vulkan/command.h"
|
||||
#include "QF/Vulkan/instance.h"
|
||||
#include "QF/Vulkan/image.h"
|
||||
#include "QF/Vulkan/pipeline.h"
|
||||
#include "QF/Vulkan/renderpass.h"
|
||||
#include "QF/Vulkan/shader.h"
|
||||
#include "QF/Vulkan/swapchain.h"
|
||||
|
@ -158,6 +159,9 @@ clear_table (hashtab_t **table)
|
|||
void
|
||||
Vulkan_Shutdown_Common (vulkan_ctx_t *ctx)
|
||||
{
|
||||
if (ctx->pipeline) {
|
||||
QFV_DestroyPipeline (ctx->device, ctx->pipeline);
|
||||
}
|
||||
if (ctx->framebuffers.size) {
|
||||
Vulkan_DestroyFramebuffers (ctx);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue