Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.06k stars 511 forks source link

Swapchain creation error when use MSI afterburner. #332

Open asdfz1346 opened 1 year ago

asdfz1346 commented 1 year ago

I followed the tutorial and drew the triangle. When I run MSI afterburner, the console gives me an error:

validation layer: Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] Object 0: handle = 0x18e224febb8, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xc036022f | vkCreateSwapchainKHR(): pCreateInfo->imageFormat VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: The implied image creation parameters of the swapchain must be supported as reported by vkGetPhysicalDeviceImageFormatProperties (https://vulkan.lunarg.com/doc/view/1.3.236.0/windows/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)

It looks like my program using imageUsage incorrectly. I tried to debug and after the program executed vkCreateSwapchainKHR(device_, &createInfo, nullptr, &swapChain) then createInfo.imageUsage was incorrectly added with All physical device's format capabilities.

This may not be an appropriate place to report the issue. Just hope others are not bothered by this issue.