base: Check for swapchain blit source feature instead of destination

As I understand it the goal is to use the swapchain image as a transfer
source (for taking screenshots), not as a transfer destination.
This commit is contained in:
Wladimir J. van der Laan 2017-10-09 13:35:32 +00:00
parent e585f3b346
commit 1ed282d2ee

View file

@ -394,7 +394,7 @@ public:
// Set additional usage flag for blitting from the swapchain images if supported // Set additional usage flag for blitting from the swapchain images if supported
VkFormatProperties formatProps; VkFormatProperties formatProps;
vkGetPhysicalDeviceFormatProperties(physicalDevice, colorFormat, &formatProps); vkGetPhysicalDeviceFormatProperties(physicalDevice, colorFormat, &formatProps);
if (formatProps.optimalTilingFeatures & VK_FORMAT_FEATURE_BLIT_DST_BIT) { if (formatProps.optimalTilingFeatures & VK_FORMAT_FEATURE_BLIT_SRC_BIT) {
swapchainCI.imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; swapchainCI.imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
} }