Commit 2038c979 authored by Laszlo Agocs's avatar Laszlo Agocs
Browse files

vk: track depth-stencil "renderbuffer" usage correctly

parent d32751cd
...@@ -1833,6 +1833,8 @@ void QRhiVulkan::activateTextureRenderTarget(QRhiCommandBuffer *, QRhiTextureRen ...@@ -1833,6 +1833,8 @@ void QRhiVulkan::activateTextureRenderTarget(QRhiCommandBuffer *, QRhiTextureRen
rbD->lastActiveFrameSlot = currentFrameSlot; rbD->lastActiveFrameSlot = currentFrameSlot;
} }
} }
if (rtD->m_desc.depthStencilBuffer())
QRHI_RES(QVkRenderBuffer, rtD->m_desc.depthStencilBuffer())->lastActiveFrameSlot = currentFrameSlot;
if (rtD->m_desc.depthTexture()) { if (rtD->m_desc.depthTexture()) {
QVkTexture *depthTexD = QRHI_RES(QVkTexture, rtD->m_desc.depthTexture()); QVkTexture *depthTexD = QRHI_RES(QVkTexture, rtD->m_desc.depthTexture());
depthTexD->layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; depthTexD->layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
...@@ -3718,7 +3720,6 @@ void QVkBuffer::release() ...@@ -3718,7 +3720,6 @@ void QVkBuffer::release()
pendingDynamicUpdates[i].clear(); pendingDynamicUpdates[i].clear();
} }
// the rhi is still around, good
QRHI_RES_RHI(QRhiVulkan); QRHI_RES_RHI(QRhiVulkan);
rhiD->releaseQueue.append(e); rhiD->releaseQueue.append(e);
...@@ -3926,7 +3927,6 @@ void QVkTexture::release() ...@@ -3926,7 +3927,6 @@ void QVkTexture::release()
imageAlloc = nullptr; imageAlloc = nullptr;
nativeHandlesStruct.image = VK_NULL_HANDLE; nativeHandlesStruct.image = VK_NULL_HANDLE;
// the rhi is still around, good
QRHI_RES_RHI(QRhiVulkan); QRHI_RES_RHI(QRhiVulkan);
rhiD->releaseQueue.append(e); rhiD->releaseQueue.append(e);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment