Skip to content

Validation for VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912 is not correct according to the Vulkan spec. #5671

Closed
@matasx8

Description

Environment:

  • OS: Windows 10
  • GPU: RTX 3070ti
  • SDK or header version if building from repo: Vulkan SDK 1.3.243.0
  • Options enabled (synchronization, best practices, etc.):

Describe the Issue
VVL error introduced in this PR is not correct according to the Vulkan spec. The spec says (source):

An application may open a debug label region in one command buffer and close it in another, or otherwise split debug label regions across multiple command buffers or multiple queue submissions. When viewed from the linear series of submissions to a single queue, the calls to vkCmdBeginDebugUtilsLabelEXT and vkCmdEndDebugUtilsLabelEXT must be matched and balanced.

This validation check implemented here checks for matching debug labels per command buffer while it should check per queue. There's an exception for secondary command buffers (source):

VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01913
If commandBuffer is a secondary command buffer, there must be an outstanding vkCmdBeginDebugUtilsLabelEXT command recorded to commandBuffer that has not previously been ended by a call to vkCmdEndDebugUtilsLabelEXT

In that case checking for matching debug labels makes sense per secondary command buffer.

Steps to reproduce

  1. Download and install Unity 2022.2.4f1 or above (e.g. https://unity.com/releases/editor/whats-new/2022.2.15)
  2. Install VVL that has this PR landed
  3. Launch Unity with any project
  4. Switch Graphics API to Vulkan (https://docs.unity3d.com/Manual/GraphicsAPIs.html)
  5. Launch Unity again with --force-vulkan-layers argument from CLI.
  6. Observe VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912 get logged in the Unity console.

Expected behavior
VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912 gets validated per queue
VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01913 gets validated per secondary command buffer

Valid Usage ID
VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions