KhronosGroup / KhronosGroup/Vulkan-Docs

`VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912` spec clarification

Open
#2,137 3 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

For context we received complaints about our validation of VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912

Here is the relevant documentation: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndDebugUtilsLabelEXT.html

Here is the issue which started this: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5671
Here is my PR: https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/5941

Our validation of VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912 was invalid.

We were checking per command buffer instead of per queue.

VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912: There must be an outstanding vkCmdBeginDebugUtilsLabelEXT command prior to the vkCmdEndDebugUtilsLabelEXT on the queue that commandBuffer is submitted to

As a result I intended to move the validation to vkQueueSubmit/vkQueueSubmit2 (Which as @spencer-lunarg pointed out isn't enough. It also would need to happen at vkQueueBindSparse).

However, I ran into confusion when reading the spec

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.

The main trouble is the or multiple queue submissions part.

Which makes it sounds like you can open a debug label region on 1 queue. Submit. Then end the debug label, then submit. And it's still valid.

As a result I asked @MarkY-LunarG (The author of this extension) for clarification and they said

I was working with the AMD people who were using this, and we really can't validate it. I thought we added a note that we might not be able to validate it because of all this.

However, based on feedback from @pdaniell-nv I think we can ignore the GPU side and do the validation based only on the VkQueue object the command buffers are submitted on (Although @pdaniell-nv admitted they may be missing some needed context).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.