Vulkan error when running examples without the --release flag
Bevy version
bevy 0.7.0
Relevant system information
rustc 1.61.0 Windows 10
AdapterInfo:
AdapterInfo { name: "GeForce GTX 1660 Ti", vendor: 4318, device: 8578, device_type: DiscreteGpu, backend: Vulkan }
What you did
Running the bevy examples without using the release flag:
cargo run --example "example_name"
Setting up a minimal project:
use bevy::prelude::*;
fn main() {
let mut app = App::new();
app.add_plugins(DefaultPlugins);
app.run();
}
results in the same error, while running fine in release mode.
What went wrong
A blank window appears while the console shows the following error:
2022-06-05T11:15:43.301601Z ERROR wgpu_hal::vulkan::instance: VALIDATION [VUID-VkFramebufferCreateInfo-flags-03189 (0x0)]
vkCreateFramebuffer(): VkFramebufferCreateInfo flags includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, but the imagelessFramebuffer feature is not enabled. The Vulkan spec states: If the imageless framebuffer feature is not enabled, flags must not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-flags-03189)
2022-06-05T11:15:43.302285Z ERROR wgpu_hal::vulkan::instance: objects: (type: UNKNOWN, hndl: 0x0, name: ?)
2022-06-05T11:15:43.302903Z ERROR wgpu_hal::vulkan::instance: VALIDATION [VUID-VkRenderPassBeginInfo-framebuffer-03209 (0x0)]
VkRenderPassBeginInfo: Image view #1 created from an image with flags set as 0x400, but image info #1 used to create the framebuffer had flags set as 0x0 The Vulkan spec states: If framebuffer was created with a VkFramebufferCreateInfo::flags value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the pAttachments member of an instance of VkRenderPassAttachmentBeginInfoKHR included in the pNext chain must be a VkImageView of an image created with a value of VkImageCreateInfo::flags equal to the flags member of the corresponding element of VkFramebufferAttachmentsCreateInfoKHR::pAttachments used to create framebuffer (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkRenderPassBeginInfo-framebuffer-03209)
2022-06-05T11:15:43.303602Z ERROR wgpu_hal::vulkan::instance: objects: (type: RENDER_PASS, hndl: 0x7c72c9000000008c, name: ?)
2022-06-05T11:15:43.304076Z ERROR wgpu_hal::vulkan::instance: VALIDATION [VUID-VkRenderPassBeginInfo-framebuffer-03210 (0x0)]
VkRenderPassBeginInfo: Image view #1 created from an image with usage set as 0x11, but image info #1 used to create the framebuffer had usage set as 0x10 The Vulkan spec states: If framebuffer was created with a VkFramebufferCreateInfo::flags value that included VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the pAttachments member of an instance of VkRenderPassAttachmentBeginInfoKHR included in the pNext chain must be a VkImageView of an image created with a value of VkImageCreateInfo::usage equal to the usage member of the corresponding element of VkFramebufferAttachmentsCreateInfoKHR::pAttachments used to create framebuffer (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkRenderPassBeginInfo-framebuffer-03210)
2022-06-05T11:15:43.304762Z ERROR wgpu_hal::vulkan::instance: objects: (type: RENDER_PASS, hndl: 0x7c72c9000000008c, name: ?)
error: process didn't exit successfully: `D:\projects\bevy\target\debug\examples\shadow_biases.exe` (exit code: 0xc000041d)
The window closes automatically after a few seconds.
Have you made sure your graphics drivers are updated? Something similar has previously been reported as https://github.com/gfx-rs/wgpu/issues/2176, so I'd guess you might also need to update your vulkan sdk.
Otherwise, this is a wgpu bug - can you check what happens with their examples?
Same error on the wgpu examples. I'll update my graphics drives and see if it persists.
I find it weird though that there are no issues in release mode.
Same error after updating the drivers, I'll make a wgpu isue.
It was the Vulkan SDK, updating that did the trick