1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-23 19:54:16 +01:00

[dxvk] Fix some potential image layout bugs

This commit is contained in:
Philip Rebohle 2025-02-17 01:25:16 +01:00
parent 9389a0ca96
commit f2802dd2ff

View File

@ -1846,8 +1846,9 @@ namespace dxvk {
VkImageLayout srcLayout, VkImageLayout srcLayout,
VkImageLayout dstLayout) { VkImageLayout dstLayout) {
this->spillRenderPass(false); this->spillRenderPass(false);
if (srcLayout != dstLayout) { if (srcLayout != dstLayout) {
prepareImage(dstImage, dstSubresources);
flushPendingAccesses(*dstImage, dstSubresources, DxvkAccess::Write); flushPendingAccesses(*dstImage, dstSubresources, DxvkAccess::Write);
accessImage(DxvkCmdBuffer::ExecBuffer, accessImage(DxvkCmdBuffer::ExecBuffer,
@ -3763,7 +3764,8 @@ namespace dxvk {
if (attachmentIndex < 0) { if (attachmentIndex < 0) {
this->spillRenderPass(false); this->spillRenderPass(false);
flushPendingAccesses(*imageView->image(), imageView->imageSubresources(), DxvkAccess::Write); this->prepareImage(imageView->image(), imageView->subresources());
this->flushPendingAccesses(*imageView->image(), imageView->imageSubresources(), DxvkAccess::Write);
if (unlikely(m_features.test(DxvkContextFeature::DebugUtils))) { if (unlikely(m_features.test(DxvkContextFeature::DebugUtils))) {
const char* dstName = imageView->image()->info().debugName; const char* dstName = imageView->image()->info().debugName;
@ -3867,6 +3869,7 @@ namespace dxvk {
spillRenderPass(false); spillRenderPass(false);
invalidateState(); invalidateState();
prepareImage(imageView->image(), imageView->subresources());
flushPendingAccesses(*imageView->image(), imageView->imageSubresources(), DxvkAccess::Write); flushPendingAccesses(*imageView->image(), imageView->imageSubresources(), DxvkAccess::Write);
cmdBuffer = DxvkCmdBuffer::ExecBuffer; cmdBuffer = DxvkCmdBuffer::ExecBuffer;