bevyengine / bevyengine/bevy

Wgpu vulkan validation layer error in debug mode

Open
#3,555 1 comment 1 reaction 0 assignees View on GitHub
A-Rendering C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version
Main, anything past [commit b9c623e](https://github.com/bevyengine/bevy/commit/b9c623e4f3b0cfbabaff054828cd70224ba97553).

## Operating system & version
Ubuntu 20.04.3

## What you did
I tried to follow the [rect.rs example](https://github.com/bevyengine/bevy/blob/main/examples/2d/rect.rs). Minimal repro:
```toml
[package]
name = "bugtest"
version = "0.1.0"
edition = "2021"

[dependencies]
bevy = { git = "https://github.com/bevyengine/bevy" }
```
```rust
use bevy::prelude::*;

fn main() {
App::new()
.add_plugins(DefaultPlugins)
.run();
}
```
& `cargo run`. (must be debug mode)

## What you expected to happen
Clean launch without errors

## What actually happened
wgpu reports a validation error:
```console
ERROR wgpu_hal::vulkan::instance: VALIDATION [VUID-VkDescriptorSetLayoutCreateInfo-descriptorType-03001 (0x8ac432cd)]
Validation Error: [ VUID-VkDescriptorSetLayoutCreateInfo-descriptorType-03001 ]
Object 0: handle = 0x5630942eea90, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x8ac432cd |
vkCreateDescriptorSetLayout():
binding (4) has VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT flag, but binding (1) has descriptor type
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC.
The Vulkan spec states: If any binding has the VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT bit set, then all
bindings must not have descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
(https://vulkan.lunarg.com/doc/view/1.2.189.0/linux/1.2-extensions/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-descriptorType-03001)
ERROR wgpu_hal::vulkan::instance: objects: (type: DEVICE, hndl: 0x5630942eea90, name: ?)
```
Application still launches and the error only appears once per launch

## Additional information
Output before error:
```
INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) Xe Graphics (TGL GT2)", vendor: 32902, device: 39497, device_type: IntegratedGpu, backend: Vulkan }
```
Vulkan version (from `vulkaninfo | head -n 5`):
```
Vulkan Instance Version: 1.2.189
```
Rust version `rustc 1.59.0-nightly (78fd0f633 2021-12-29)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.