KhronosGroup / KhronosGroup/Vulkan-Docs

VkDescriptorSetVariableDescriptorCountAllocateInfo::pDescriptorCounts Documentation clarification/improvement

Open
#1,909 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Resolving Inside Khronos
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

The spec (version 1.3.223) says:

If descriptorSetCount is zero or this structure is not included in the pNext chain, then the variable lengths are considered to be zero. Otherwise, pDescriptorCounts[i] is the number of descriptors in the variable-sized descriptor binding in the corresponding descriptor set layout.

It isn't particularly clear whether pDescriptorCounts[i] being zero is legit or not. The spec doesn't seem to state what should happen in such case.

I've tried to allocate a descriptor set with some fixed descriptor bidings and a variable-sized binding, passing the corresponding pDescriptorCounts[i]=0 into vkAllocateDescriptorSets() on different GPUs. On NVIDIA (driver 516.59) this results in a (usable) descriptor being allocated. On AMD (driver 22.7.1) vkAllocateDescriptorSets() returns VK_ERROR_OUT_OF_POOL_MEMORY.
Apparently, vendors handle this differently.

There seem to be no relevant paragraphs in the "Valid Usage" section of the spec, so the validation layer has nothing to say about this.

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.

Research direction

Read the quoted Vulkan 1.3.223 wording for VkDescriptorSetVariableDescriptorCountAllocateInfo::pDescriptorCounts and review its Valid Usage section. Compare the reported NVIDIA and AMD behavior, then clarify the normative treatment of a zero pDescriptorCounts[i] value in the specification so implementations and validation have an unambiguous outcome.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.