Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most of the samples have Vulkan swapchain validation errors #2286

Closed
aloucks opened this issue Dec 13, 2021 · 5 comments
Closed

Most of the samples have Vulkan swapchain validation errors #2286

aloucks opened this issue Dec 13, 2021 · 5 comments
Labels
area: api Issues related to API surface area: correctness We're behaving incorrectly help required We need community help to make this happen.

Comments

@aloucks
Copy link
Contributor

aloucks commented Dec 13, 2021

Description
Most of the samples have validation errors.

Repro steps
All of the samples that open a window and render show this swapchain error:

$ WGPU_POWER_PREF=high cargo run --example boids
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
     Running `target\debug\examples\boids.exe`
Using NVIDIA GeForce RTX 2060 (Vulkan)
[2021-12-13T14:33:24Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0x7cd0911d)]
        Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x1a999117898, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (1904,990), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (800,600), minImageExtent = (800,600), maxImageExtent = (800,600). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
[2021-12-13T14:33:24Z ERROR wgpu_hal::vulkan::instance]         objects: (type: DEVICE, hndl: 0x1a999117898, name: ?)

Expected vs observed behavior
No validation errors

Platform
Windows 10

@kvark
Copy link
Member

kvark commented Dec 13, 2021

We need a way for wgpu implementation to report back the surface size limits. And then, ideally, winit-based examples would respect those limits.

@kvark kvark added area: api Issues related to API surface area: correctness We're behaving incorrectly help required We need community help to make this happen. labels Dec 13, 2021
@aloucks
Copy link
Contributor Author

aloucks commented Dec 13, 2021

That makes sense for the first one. I think this is actually a bug in winit. I see an erroneous resize event happening even in the winit examples. However, shouldn't wgpu refuse to execute the resize if it's outside the range of valid values (I do see a validation warning if I enable logging)?

The second issue looks unrelated though. Should I open a different issue for that?

@kvark
Copy link
Member

kvark commented Dec 13, 2021

The second issue looks unrelated though. Should I open a different issue for that?

yes, please

However, shouldn't wgpu refuse to execute the resize if it's outside the range of valid values (I do see a validation warning if I enable logging).

yes, it should. I suppose this validation check is missing.

@aloucks
Copy link
Contributor Author

aloucks commented Dec 13, 2021

yes, it should. I suppose this validation check is missing.

wgpu itself logs a warning (separate from the vulkan validation) but otherwise ignores it.

@aloucks aloucks changed the title Most of the samples have Vulkan validation errors Most of the samples have Vulkan swapchain validation errors Dec 13, 2021
@cwfitzgerald
Copy link
Member

This is now not a problem with up to date vulkan sdks

cwfitzgerald pushed a commit that referenced this issue Oct 25, 2023
* [spirv-out] Fix adding illegal decorators on fragment outputs.

Furthermore, fix allowing to add `Centroid` and `Sample` decorator to vertex inputs.
Fixes #2270

* Add test for fragment outputs

* Fix fragment-output.wgsl test using more than 8 outputs in a single shader
Breaks HLSL & MSL validation

* formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface area: correctness We're behaving incorrectly help required We need community help to make this happen.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants