From 5f46679764de3fac761263d3e02b64fd0f6e1a1d Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 1 Mar 2025 14:21:24 +0100 Subject: [PATCH] [dxvk] Fix uploadImage barriers --- src/dxvk/dxvk_context.cpp | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index ad4108fec..7bcb4cabe 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -5275,30 +5275,8 @@ namespace dxvk { } } - if (m_device->hasDedicatedTransferQueue()) { - VkImageMemoryBarrier2 barrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2 }; - barrier.srcStageMask = VK_PIPELINE_STAGE_2_TRANSFER_BIT; - barrier.srcAccessMask = VK_ACCESS_2_TRANSFER_WRITE_BIT; - barrier.oldLayout = transferLayout; - barrier.newLayout = image->info().layout; - barrier.srcQueueFamilyIndex = m_device->queues().transfer.queueFamily; - barrier.dstQueueFamilyIndex = m_device->queues().graphics.queueFamily; - barrier.image = image->handle(); - barrier.subresourceRange = image->getAvailableSubresources(); - - m_sdmaBarriers.addImageBarrier(barrier); - - barrier.srcStageMask = VK_PIPELINE_STAGE_2_NONE; - barrier.srcAccessMask = VK_ACCESS_2_NONE; - barrier.dstStageMask = image->info().stages; - barrier.dstAccessMask = image->info().access; - - m_initBarriers.addImageBarrier(barrier); - } else { - accessImage(DxvkCmdBuffer::SdmaBuffer, *image, image->getAvailableSubresources(), - transferLayout, VK_PIPELINE_STAGE_2_TRANSFER_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT, - DxvkAccessOp::None); - } + accessImageTransfer(*image, image->getAvailableSubresources(), transferLayout, + VK_PIPELINE_STAGE_2_TRANSFER_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT); m_cmd->track(source, DxvkAccess::Read); m_cmd->track(image, DxvkAccess::Write);