wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

Vulkan validation errors during surface config

Open Jaisiero opened this issue 1 year ago • 3 comments

Description Following wgpu-learn tutorial 2, when the app executes the following line: surface.configure(&device, &config); I got some Vulkan validation errors related to surface & image format.

I print my avaliable formats: Bgra8UnormSrgb Bgra8Unorm Rgba16Float

tutorial gets the first one by default. I tried to get every of them but nothing changed.

Repro steps wgpu-learn.tutorial-2

Expected vs observed behavior Every time it renders using the raster pipeline during the next chapter, those validation errors still come out.

Extra materials

[2023-09-24T22:05:30Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 (0xc036022f)]
        Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] | 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.261.0/windows/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)
[2023-09-24T22:05:30Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 (0xc036022f)]
        Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] | MessageID = 0xc036022f | vkGetPhysicalDeviceImageFormatProperties() unexpectedly failed, when called for vkCreateSwapchainKHR() validation with following params: format: VK_FORMAT_B8G8R8A8_SRGB, imageType: VK_IMAGE_TYPE_2D, tiling: VK_IMAGE_TILING_OPTIMAL, usage: VK_IMAGE_USAGE_STORAGE_BIT|VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, flags: VkImageCreateFlags(0). 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.261.0/windows/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)
[2023-09-24T22:05:30Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 (0xc036022f)]
        Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] | MessageID = 0xc036022f | vkCreateSwapchainKHR() called with a non-supported imageArrayLayers (i.e. 1). Maximum value returned by vkGetPhysicalDeviceImageFormatProperties() is 0 for imageFormat VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL 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.261.0/windows/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)
[2023-09-24T22:05:30Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 (0xc036022f)]
        Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] | MessageID = 0xc036022f | vkCreateSwapchainKHR() called with imageExtent = (800,600), which is bigger than max extent (0,0)returned by vkGetPhysicalDeviceImageFormatProperties(): for imageFormat VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL 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.261.0/windows/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)

Platform

  • Wgpu 0.17 from repo.
  • Window 11.
  • Vulkan SDK 1.3.261.0.
  • Nvidia RTX 4090.
  • Nvidia drivers version 537.34

Cheers, Jaime.

Jaisiero avatar Sep 24 '23 22:09 Jaisiero