FrameGraph icon indicating copy to clipboard operation
FrameGraph copied to clipboard

validation failed when running Tests.FrameGraph, Debug x64

Open raptoravis opened this issue 3 years ago • 2 comments

image

raptoravis avatar Dec 18 '20 02:12 raptoravis

It looks like a bug in new validation layers. If I use vkCmdDispath instead of vkCmdDispatchBase then the error disappears.

azhirnov avatar Dec 18 '20 03:12 azhirnov

I don't read error message, my previous answer is for another error. Current validation message is Descriptor in binding #0 index 8 is being used in draw but has never been updated via vkUpdateDescriptorSets() or a similar call. This error occurs when used descriptor indexing. To fix it I need to create VkDescriptorSetLayout with actual size of runtime sized array, but in FG pipeline creation is hidden inside and I don't know a convenient way to pass array size into pipeline creation code. In this test index 8 is not used in shader, but runtime sized array initialized with size 64 and validation error trigger error that indices 8..64 are not initialized. As said in docs it is UB and driver may crash even if uninitialized descriptors are not used in shader. Current vulkan drivers works fine, but you should not use descriptor indexing in production code to avoid any UB.

The solution of this problem may be using rebustness2 extension, but robustness extensions has performance impact.

azhirnov avatar Jan 03 '21 09:01 azhirnov