rendervulkan: Add discardImage to CVulkanCmdBuffer
This commit is contained in:
parent
555f94548e
commit
b306131b72
2 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue