Also check against TRANSFER_SRC format flag to enable swap chain image usage flag

This commit is contained in:
saschawillems 2017-10-09 20:07:16 +02:00
parent c1de34c171
commit 4a1876b023

View file

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