Changing queue acquisition

This commit is contained in:
Dynamitos
2024-02-01 08:42:24 +01:00
parent d903689435
commit 725e7cb67b
11 changed files with 99 additions and 130 deletions
+5 -7
View File
@@ -321,13 +321,17 @@ void TextureBase::executeOwnershipBarrier(Gfx::QueueType newOwner)
.image = image,
.subresourceRange = {
.aspectMask = aspect,
.baseArrayLayer = 0,
.layerCount = arrayCount,
.baseMipLevel = 0,
.levelCount = mipLevels,
},
};
PCommandPool sourcePool = graphics->getQueueCommands(currentOwner);
PCommandPool dstPool = nullptr;
VkPipelineStageFlags srcStage = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
VkPipelineStageFlags dstStage = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
if (currentOwner == Gfx::QueueType::TRANSFER || currentOwner == Gfx::QueueType::DEDICATED_TRANSFER)
if (currentOwner == Gfx::QueueType::TRANSFER)
{
imageBarrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
srcStage = VK_PIPELINE_STAGE_TRANSFER_BIT;
@@ -348,12 +352,6 @@ void TextureBase::executeOwnershipBarrier(Gfx::QueueType newOwner)
dstStage = VK_PIPELINE_STAGE_TRANSFER_BIT;
dstPool = graphics->getTransferCommands();
}
else if (newOwner == Gfx::QueueType::DEDICATED_TRANSFER)
{
imageBarrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
dstStage = VK_PIPELINE_STAGE_TRANSFER_BIT;
dstPool = graphics->getDedicatedTransferCommands();
}
else if (newOwner == Gfx::QueueType::COMPUTE)
{
imageBarrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT;