hecrj / wgpu_glyph

A fast text renderer for wgpu (https://github.com/gfx-rs/wgpu)
https://docs.rs/wgpu_glyph
MIT License
443 stars 77 forks source link

Vulkan Validation Errors #57

Open fryeb opened 3 years ago

fryeb commented 3 years ago

I'm getting vulkan validation errors when running the examples on windows, the following output is from the hello example, but I get similar results from the clipping and depth examples as well.

[2021-02-16T00:39:25Z ERROR gfx_backend_vulkan]
    VALIDATION [VUID-VkRenderPassBeginInfo-framebuffer-03210 (-872316813)] : Validation Error: [ VUID-VkRenderPassBeginInfo-framebuffer-03210 ] Object 0: handle = 0xbb4e7a000000001f, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0xcc018073 | vkCmdBeginRenderPass(): Image view #0 created from an image with usage set as 0x11, but image info #0 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, each element of the pAttachments member of a VkRenderPassAttachmentBeginInfo structure 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 VkFramebufferAttachmentsCreateInfo::pAttachments used to create framebuffer (https://vulkan.lunarg.com/doc/view/1.2.162.0/windows/1.2-extensions/vkspec.html#VUID-VkRenderPassBeginInfo-framebuffer-03210)
    object info: (type: RENDER_PASS, hndl: 13496859273694543903)

[2021-02-16T00:39:25Z ERROR gfx_backend_vulkan]
    VALIDATION [VUID-VkRenderPassBeginInfo-framebuffer-03210 (-872316813)] : Validation Error: [ VUID-VkRenderPassBeginInfo-framebuffer-03210 ] Object 0: handle = 0x8483000000000025, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0xcc018073 | vkCmdBeginRenderPass(): Image view #0 created from an image with usage set as 0x11, but image info #0 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, each element of the pAttachments member of a VkRenderPassAttachmentBeginInfo structure 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 VkFramebufferAttachmentsCreateInfo::pAttachments used to create framebuffer (https://vulkan.lunarg.com/doc/view/1.2.162.0/windows/1.2-extensions/vkspec.html#VUID-VkRenderPassBeginInfo-framebuffer-03210)
    object info: (type: RENDER_PASS, hndl: 9548475634955583525)

This is running with VulkanSDK version 1.2.162.0 on an nvidia gtx 1050.

HalfVoxel commented 3 years ago

Not an issue with wgpu_glyph: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2502

sfricke-samsung commented 3 years ago

I have been trying to understand what is causing the mismatch in usage flags, could you look at the instructions I have in the Validation Layer issue and if you can get me some api dump of the issue it would be helpful (since I can't reproduce it on my machine)