From e24954ca39a606c8e38c03f994d692a67ba8e387 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 2 May 2020 19:57:10 +0200 Subject: [PATCH] [dxvk] Optimize clearColorImage barrier --- src/dxvk/dxvk_context.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 0a8af3fdb..0d77f31f1 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -429,19 +429,14 @@ namespace dxvk { const VkImageSubresourceRange& subresources) { this->spillRenderPass(); - m_execBarriers.recordCommands(m_cmd); - VkImageLayout imageLayoutClear = image->pickLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); - m_execBarriers.accessImage(image, subresources, - VK_IMAGE_LAYOUT_UNDEFINED, - image->info().stages, - image->info().access, + this->initializeImage(image, subresources, imageLayoutClear, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT); - m_execBarriers.recordCommands(m_cmd); + m_execAcquires.recordCommands(m_cmd); m_cmd->cmdClearColorImage(image->handle(), imageLayoutClear, &value, 1, &subresources);