KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
766 stars 404 forks source link

VK_LAYER_KHRONOS_validation "Check Out of Bounds" causes invaildation of descriptor set when using descriptor buffers. #6025

Open codecnotsupported opened 1 year ago

codecnotsupported commented 1 year ago

Environment:

Describe the Issue

The Check Out of Bounds option in the VK_LAYER_KHRONOS_validation causes descriptor to be invalid when using descriptor buffers.

This can be verified by running the desciptor_buffer_basic sample from Vulkan-Samples with the "Check Out of Bounds" option enabled in Vulkan Configurator.

Note: The Imgui overlay still works fine in the sample, which uses vkCmdBindDescriptorSets, which might mean that Check Out of Bounds is only using vkCmdBindDescriptorSets instead of vkCmdBindDescriptorBuffersEXT & vkCmdSetDescriptorBufferOffsetsEXT when descriptor buffers are used. Causing the descriptor set to be invalidated.

Expected behavior

I expect a warning that descriptor buffers aren't supported at the very least. Otherwise support for descriptor buffers would be nice.

Valid Usage ID

UNASSIGNED-Descriptor uninitialized(ERROR / SPEC): msgNum: -1993010233 - Validation Error: [ UNASSIGNED-Descriptor uninitialized ] Object 0: handle = 0x55ecad051c60, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0x893513c7 | Descriptor index 0 is uninitialized. Command buffer (0x55ecaecc6b90). Draw Index 0. Pipeline (0x72303f0000000052). Shader Module (0x7f79ad0000000050). Shader Instruction Index = 84.  Stage = Vertex. Vertex Index = 1 Instance Index = 0.  Unable to find SPIR-V OpLine for source information.  Build shader with debug info to get source information.
    Objects: 1
        [0] 0x55ecad051c60, type: 4, name: NULL

Additional context N/A

codecnotsupported commented 1 year ago

Check descriptor indexing accesses causes the same issue. But only in my test application, it doesn't affect the desciptor_buffer_basic sample.

TonyBarbour commented 1 year ago

Descriptor buffer GPU-AV is a work in progress. I've been meaning to add a warning for a while. Added in #6030