From 704fc4eaa74e5d56812da561fc6590c13a076365 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 11 Oct 2024 21:30:52 +0200 Subject: [PATCH] [dxvk] Use new layout transition helper in copySparseImagePages --- src/dxvk/dxvk_context.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index c7bb671ba..4b8c41461 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -4094,16 +4094,9 @@ namespace dxvk { ? VK_ACCESS_TRANSFER_READ_BIT : VK_ACCESS_TRANSFER_WRITE_BIT; - if (sparse->info().layout != transferLayout) { - m_execAcquires.accessImage(sparse, sparseSubresources, - sparse->info().layout, - sparse->info().stages, 0, - transferLayout, - VK_PIPELINE_STAGE_TRANSFER_BIT, - transferAccess); - - m_execAcquires.recordCommands(m_cmd); - } + addImageLayoutTransition(*sparse, sparseSubresources, transferLayout, + VK_PIPELINE_STAGE_2_TRANSFER_BIT, transferAccess, false); + flushImageLayoutTransitions(DxvkCmdBuffer::ExecBuffer); for (uint32_t i = 0; i < pageCount; i++) { auto pageInfo = pageTable->getPageInfo(pages[i]);