mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- delay postprocess texture destruction until the end of the frame
This commit is contained in:
parent
8853872bb4
commit
13cab1c0b6
2 changed files with 12 additions and 0 deletions
|
@ -402,6 +402,17 @@ VkPPTexture::VkPPTexture(PPTexture *texture)
|
|||
}
|
||||
}
|
||||
|
||||
VkPPTexture::~VkPPTexture()
|
||||
{
|
||||
if (auto fb = GetVulkanFrameBuffer())
|
||||
{
|
||||
if (TexImage.Image) fb->FrameDeleteList.Images.push_back(std::move(TexImage.Image));
|
||||
if (TexImage.View) fb->FrameDeleteList.ImageViews.push_back(std::move(TexImage.View));
|
||||
if (TexImage.DepthOnlyView) fb->FrameDeleteList.ImageViews.push_back(std::move(TexImage.DepthOnlyView));
|
||||
if (Staging) fb->FrameDeleteList.Buffers.push_back(std::move(Staging));
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
VkPPShader::VkPPShader(PPShader *shader)
|
||||
|
|
|
@ -88,6 +88,7 @@ class VkPPTexture : public PPTextureBackend
|
|||
{
|
||||
public:
|
||||
VkPPTexture(PPTexture *texture);
|
||||
~VkPPTexture();
|
||||
|
||||
VkTextureImage TexImage;
|
||||
std::unique_ptr<VulkanBuffer> Staging;
|
||||
|
|
Loading…
Reference in a new issue