gfx-rs / wgpu-rs

Rust bindings to wgpu native library
https://wgpu.rs
Mozilla Public License 2.0
1.69k stars 186 forks source link

Program aborts when creating `RenderPass` #782

Closed maroider closed 3 years ago

maroider commented 3 years ago

Platform OS: Windows 10 CPU: Intel Core I3-6100U GPU: Integrated

Description

When I try to run a program using wgpu, the program aborts while creating a RenderPass.

This holds for any wgpu-rs example on revisions after (and including) 6d52bc5. Examples which want to present onto a window abort after opening the window and hanging for a bit.

The boids example spits out the following when run:

Using Intel(R) HD Graphics 520 (Vulkan)
[1.219608 ERROR]()(no module):
VALIDATION [VUID-VkRenderPassBeginInfo-framebuffer-03209 (0)] : VkRenderPassBeginInfo: Image view #0 created from an image with flags set as 0x400, but image info #0 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)
object info: (type: RENDER_PASS, hndl: 8344361968471113764)

error: process didn't exit successfully: `target\debug\examples\boids.exe` (exit code: 0xc000041d)

This seems similar to #762, but this issue occurs immediately when a RenderPass is being created (or so it seems).

kvark commented 3 years ago

Unfortunately, this is the same old https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2502 If you disable the validation layers (via LunarG configurator, for example), or run in release, it should run fine.

maroider commented 3 years ago

If you disable the validation layers (via LunarG configurator, for example), or run in release, it should run fine.

That seems to solve it, yes. Thanks for the swift response.

maroider commented 3 years ago

Actually, it just occurred to me that I'm using an older version of the Vulkan SDK (1.1.121.2). Unfortunately, the machine where I experience this issue won't recognize the validation layers from 1.2.170.0, so I can't really check if that was the culprit or not.