rendervulkan: Add discardImage to CVulkanCmdBuffer

This commit is contained in:
Joshua Ashton 2023-09-14 09:17:12 +01:00 committed by Joshie
parent 555f94548e
commit b306131b72
2 changed files with 9 additions and 0 deletions

View file

@ -1544,6 +1544,14 @@ void CVulkanCmdBuffer::prepareDestImage(CVulkanTexture *image)
result.first->second.needsPresentLayout = image->swapchainImage();
}
void CVulkanCmdBuffer::discardImage(CVulkanTexture *image)
{
auto result = m_textureState.emplace(image, TextureState());
if (!result.second)
return;
result.first->second.discarded = true;
}
void CVulkanCmdBuffer::markDirty(CVulkanTexture *image)
{
auto result = m_textureState.find(image);

View file

@ -804,6 +804,7 @@ public:
private:
void prepareSrcImage(CVulkanTexture *image);
void prepareDestImage(CVulkanTexture *image);
void discardImage(CVulkanTexture *image);
void markDirty(CVulkanTexture *image);
void insertBarrier(bool flush = false);