StudioCherno / Walnut

Walnut is a simple application framework for Vulkan and Dear ImGui apps
MIT License
1.99k stars 367 forks source link

Vulkan validation error #34

Open Kid80 opened 1 year ago

Kid80 commented 1 year ago

When I run the walnut example repo I get these errors, but the window still seems to work normally.

[vulkan] Debug report from ObjectType: 19
Message: Validation Error: [ VUID-vkCmdDrawIndexed-blendEnable-04727 ] Object 0: handle = 0x27d60e0000000019, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0x8a06751e | vkCmdDrawIndexed: Image view's format features of the color attachment (0) of the active subpass do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT bit, but active pipeline's pAttachments[0].blendEnable is not VK_FALSE. The Vulkan spec states: If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view's format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the blendEnable member of the corresponding element of the pAttachments member of pColorBlendState must be VK_FALSE (https://vulkan.lunarg.com/doc/view/1.3.236.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdDrawIndexed-blendEnable-04727)

[vulkan] Debug report from ObjectType: 23
Message: Validation Error: [ VUID-vkCmdDrawIndexed-magFilter-04553 ] Object 0: handle = 0x908683000000001d, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x9fde6b0000000014, type = VK_OBJECT_TYPE_SAMPLER; Object 2: handle = 0x2cfba2000000001c, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x9c7248ee | vkCmdDrawIndexed: Descriptor set VkDescriptorSet 0x908683000000001d[] Sampler (VkSampler 0x9fde6b0000000014[]) is set to use VK_FILTER_LINEAR with compareEnable is set to VK_FALSE, but image view's (VkImageView 0x2cfba2000000001c[]) format (VK_FORMAT_R8G8B8A8_UNORM) does not contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in its format features. The Vulkan spec states: If a VkSampler created with magFilter or minFilter equal to VK_FILTER_LINEAR and compareEnable equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view's format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT (https://vulkan.lunarg.com/doc/view/1.3.236.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdDrawIndexed-magFilter-04553)

I've tried reinstalling Vulkan and I've updated my graphics drivers.

It seems like the only problem is with validation, since the program seems to work properly. Should I change the Vulkan validation layer?

sinisastevanovic commented 1 year ago

Same here. Did you find a solution?

CHCDST-SY commented 1 year ago

I have the same problem. And as soon as I resize the imgui demo widget, the .exe aborts. here's what I got : [vulkan] Debug report from ObjectType: 1 Message: Validation Error: [ VUID-VkImageMemoryBarrier-image-parameter ] Object 0: handle = 0x2069dad7bf0, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xe5f1f8f4 | Invalid VkImage Object 0x5528b100000009b4. The Vulkan spec states: image must be a valid VkImage handle (https://vulkan.lunarg.com/doc/view/1.3.236.0/windows/1.3-extensions/vkspec.html#VUID-VkImageMemoryBarrier-image-parameter)

E:\code\vsProjects\Walnut\Walnut\bin\Debug-windows-x86_64\WalnutApp\WalnutApp.exe (process 34548)Aborted,code is -1073741819。

DerDunkelheit commented 1 year ago

Same here. Tried to download new version of sdk, didn't work

Kid80 commented 1 year ago

Validation is only run in Debug mode, so if you change to release mode, the validation errors will not happen. This will have the side effect of validation not being run, so do it at your own risk.

This is just a workaround, not a fix

rs-sliske commented 3 weeks ago

https://github.com/ocornut/imgui/issues/7236