Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potentially false positive VUID-VkVertexInputBindingDivisorDescription-divisor-01870 #9262

Open
TheMostDiligent opened this issue Jan 19, 2025 · 6 comments
Labels
Bug Something isn't working

Comments

@TheMostDiligent
Copy link

Environment:

  • OS: Windows 10
  • GPU and driver version: NVIDIA GeForce RTX 2070 Super
  • SDK or header version if building from repo: 1.4.304

Describe the Issue

In the latest SDK version, we started observing the following error:

Vulkan debug message (validation): VUID-VkVertexInputBindingDivisorDescription-divisor-01870
                 Validation Error: [ VUID-VkVertexInputBindingDivisorDescription-divisor-01870 ] | MessageID = 0xf7312938 | vkCreateGraphicsPipelines(): pCreateInfos[0].pVertexInputState->pNext<VkVertexInputBindingDivisorDescription>.pVertexBindingDivisors[0].divisor (2) exceeds device maxVertexAttribDivisor (0).
The Vulkan spec states: divisor must be a value between 0 and VkPhysicalDeviceVertexAttributeDivisorProperties::maxVertexAttribDivisor, inclusive (https://vulkan.lunarg.com/doc/view/1.4.304.0/windows/1.4-extensions/vkspec.html#VUID-VkVertexInputBindingDivisorDescription-divisor-01870)

We don't enable the VK_KHR_vertex_attribute_divisor extension, but do enable the VK_EXT_vertex_attribute_divisor, and there was no error in prior versions.

Expected behavior

I believe there should be no validation error if VK_EXT_vertex_attribute_divisor is enabled.

@spencer-lunarg
Copy link
Contributor

We have a test (PositiveVertexInput.VertexAttributeDivisorFirstInstance https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/tests/unit/vertex_input_positive.cpp#L563C7-L605)

when I look at it, I see it correctly using VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT to get the value for maxVertexAttribDivisor (

if (dev_ext.vk_ext_vertex_attribute_divisor) {
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT vtx_attrib_divisor_props_ext;
GetPhysicalDeviceExtProperties(physical_device, dev_ext.vk_ext_vertex_attribute_divisor, &vtx_attrib_divisor_props_ext);
phys_dev_props_core14.maxVertexAttribDivisor = vtx_attrib_divisor_props_ext.maxVertexAttribDivisor;
)

So I am not quite sure what is happening our you device that you are getting a value of zero

@artem-lunarg
Copy link
Contributor

This part of the specification might explain zero divisor values:

The maximum value of divisor is implementation-dependent and can be queried using VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT::maxVertexAttribDivisor. A value of 0 can be used for the divisor if the vertexAttributeInstanceRateZeroDivisor feature is enabled. In this case, the same vertex attribute will be applied to all instances.

@spencer-lunarg
Copy link
Contributor

so here is saying in the spec that VkVertexInputBindingDescription2EXT::divisor can be zero

The property limit needs to be 2^16 - 1 and no one exposes a value of zero https://www.vulkan.gpuinfo.org/displayextensionproperty.php?extensionname=VK_EXT_vertex_attribute_divisor&extensionproperty=maxVertexAttribDivisor&platform=all

The issue is how we are tracking the EXT and KHR (and now 1.4 promoted) version of that limit, and it should be working as I can't reproduce the issue with any combination of the Test ICD and/or devices I have on me

@TheMostDiligent
Copy link
Author

TheMostDiligent commented Jan 20, 2025

The value of maxVertexAttribDivisor returned in VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT is 4294967295

@spencer-lunarg
Copy link
Contributor

@TheMostDiligent one more question, is your app a 1.4 app now?

@TheMostDiligent
Copy link
Author

It is 1.3: Using physical device 'NVIDIA GeForce RTX 2070 Super', API version 1.3.289, Driver version 54.144.0.

@spencer-lunarg spencer-lunarg added the Bug Something isn't working label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants