Skip to content

Commit

Permalink
Delete the function TransitionImageLayout2
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Apr 6, 2024
1 parent a3d0cb1 commit a66affe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
19 changes: 0 additions & 19 deletions Common/GPU/Vulkan/VulkanBarrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,3 @@ void VulkanBarrierBatch::TransitionImageAuto(
imageBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
}

void TransitionImageLayout2(VkCommandBuffer cmd, VkImage image, int baseMip, int numMipLevels, int numLayers, VkImageAspectFlags aspectMask,
VkImageLayout oldImageLayout, VkImageLayout newImageLayout,
VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask,
VkAccessFlags srcAccessMask, VkAccessFlags dstAccessMask) {
VkImageMemoryBarrier image_memory_barrier{ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
image_memory_barrier.srcAccessMask = srcAccessMask;
image_memory_barrier.dstAccessMask = dstAccessMask;
image_memory_barrier.oldLayout = oldImageLayout;
image_memory_barrier.newLayout = newImageLayout;
image_memory_barrier.image = image;
image_memory_barrier.subresourceRange.aspectMask = aspectMask;
image_memory_barrier.subresourceRange.baseMipLevel = baseMip;
image_memory_barrier.subresourceRange.levelCount = numMipLevels;
image_memory_barrier.subresourceRange.layerCount = numLayers; // We never use more than one layer, and old Mali drivers have problems with VK_REMAINING_ARRAY_LAYERS/VK_REMAINING_MIP_LEVELS.
image_memory_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
image_memory_barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
vkCmdPipelineBarrier(cmd, srcStageMask, dstStageMask, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
}
6 changes: 0 additions & 6 deletions Common/GPU/Vulkan/VulkanBarrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,3 @@ class VulkanBarrierBatch {
VkPipelineStageFlags dstStageMask_ = 0;
VkDependencyFlags dependencyFlags_ = 0;
};

// Detailed control, but just a single image. Use the barrier batch when possible.
void TransitionImageLayout2(VkCommandBuffer cmd, VkImage image, int baseMip, int mipLevels, int numLayers, VkImageAspectFlags aspectMask,
VkImageLayout oldImageLayout, VkImageLayout newImageLayout,
VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask,
VkAccessFlags srcAccessMask, VkAccessFlags dstAccessMask);

0 comments on commit a66affe

Please sign in to comment.