Skip to content

vkCmdBuildClusterAccelerationStructureIndirectNV(): pCommandInfos->srcInfosCount may be zero #2606

@zeux

Description

@zeux

Environment:

  • OS: Ubuntu Linux 25.10
  • GPU and driver version: GeForce RTX 5070 Ti + driver 580.95.05
  • SDK or header version if building from repo: SDK 1.4.328.1
  • Options enabled (synchronization, best practices, etc.): -

Describe the Issue

Using vkCmdBuildClusterAccelerationStructureIndirectNV with srcInfosCount=0 produces a validation error

Expected behavior

The specification states:

srcInfosCount is the device address of memory containing the count of number of build or move operations to perform. The actual value is the minimum of this value and the value specified in input.maxAccelerationStructureCount. If this value is 0, the count is determined by input.maxAccelerationStructureCount alone.

Thus the value of srcInfosCount may in fact be zero. However, validation layers emit the following error if it's actually zero:

ERROR: vkCmdBuildClusterAccelerationStructureIndirectNV(): pCommandInfos->srcInfosCount is zero.
The Vulkan spec states: srcInfosCount must be a valid VkDeviceAddress value (https://vulkan.lunarg.com/doc/view/1.4.328.1/linux/antora/spec/latest/chapters/accelstructures.html#VUID-VkClusterAccelerationStructureCommandsInfoNV-srcInfosCount-parameter)

Presumably, the issue is that the spec XML doesn't mark this parameter as optional:

<member><type>VkDeviceAddress</type>                                <name>srcInfosCount</name></member>

... but regardless, this is a false positive that is somewhat annoying to work around as it involves allocating and uploading the number from host to device.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions