1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-21 04:54:15 +01:00

[dxvk] Use new barrier helper in initImage

This commit is contained in:
Philip Rebohle 2024-10-11 23:09:01 +02:00 committed by Philip Rebohle
parent 94915fcbe3
commit 9698653055

View File

@ -1035,12 +1035,9 @@ namespace dxvk {
const VkImageSubresourceRange& subresources,
VkImageLayout initialLayout) {
if (initialLayout == VK_IMAGE_LAYOUT_PREINITIALIZED) {
m_initBarriers.accessImage(image, subresources,
initialLayout,
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0,
image->info().layout,
image->info().stages,
image->info().access);
accessImage(DxvkCmdBuffer::InitBuffer,
*image, subresources, initialLayout,
VK_PIPELINE_STAGE_2_NONE, 0);
m_cmd->trackResource<DxvkAccess::None>(image);
} else {
@ -1119,13 +1116,10 @@ namespace dxvk {
}
}
m_initBarriers.accessImage(image, subresources,
clearLayout,
VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_ACCESS_TRANSFER_WRITE_BIT,
image->info().layout,
image->info().stages,
image->info().access);
accessImage(DxvkCmdBuffer::InitBuffer,
*image, subresources, clearLayout,
VK_PIPELINE_STAGE_2_TRANSFER_BIT,
VK_ACCESS_2_TRANSFER_WRITE_BIT);
m_cmd->trackResource<DxvkAccess::Write>(image);
}