bevyengine / bevyengine/bevy

Validation Error in wgpu_hal::vulkan::instance when resizing window.

Open
#3,451 7 comments 1 reaction 0 assignees View on GitHub
A-Rendering C-Bug
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version
`master` branch

## Operating system & version
Arch Linux, fully updated.

## What you did
I created a new Bevy application with the following code:
```
use bevy::prelude::*;

fn main {
App::new()
.add_plugins(DefaultPlugins)
.run();
}
```

## What you expected to happen
No error should be logged when resizing the window.

## What actually happened
This error was logged:
```
ERROR wgpu_hal::vulkan::instance: VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0x7cd0911d)]
Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x55964e0750b0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (1496,862), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1505,868), minImageExtent = (1505,868), maxImageExtent = (1505,868). 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://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
```

## Additional Information
GPU is a GT 1030, with backend Vulkan.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the minimal Bevy application on Arch Linux with Vulkan and resizing the window while validation is enabled. Trace the window-resize path that creates the swapchain and compare its image extent with the reported surface capabilities; done means resizing no longer logs this validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.