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

Vague vkCmdBindDescriptorSets() specifications. #1520

Closed
Rainer-1 opened this issue May 5, 2021 · 3 comments
Closed

Vague vkCmdBindDescriptorSets() specifications. #1520

Rainer-1 opened this issue May 5, 2021 · 3 comments
Assignees
Labels

Comments

@Rainer-1
Copy link

Rainer-1 commented May 5, 2021

I am using a dynamic ssbo with range set to VK_WHOLE_SIZE, and the latest Vulkan SDK has emitted a new warning:
Validation Error: [ VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979 ] Object 0: handle = 0x13b92b0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xcfef35000000000a, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 2: handle = 0xf56c9b0000000004, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xa159a763 | vkCmdBindDescriptorSets(): pDynamicOffsets[0] is 0x3c, but must be zero since the buffer descriptor's range is VK_WHOLE_SIZE in descriptorSet #0 binding #0 descriptor[0]. The Vulkan spec states: For each dynamic uniform or storage buffer binding in pDescriptorSets, the sum of the effective offset, as defined above, and the range of the binding must be less than or equal to the size of the buffer (https://vulkan.lunarg.com/doc/view/1.2.176.0/linux/1.2-extensions/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979)

The warning quotes this from the Vulkan specification: "For each dynamic uniform or storage buffer binding in pDescriptorSets, the sum of the effective offset, as defined above, and the range of the binding must be less than or equal to the size of the buffer".
However, this text from the VkDescriptorBufferInfo specification: "range is the size in bytes that is used for this descriptor update, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer.", which specifically states that VK_WHOLE_SIZE is recalculated based on the offset, suggests that VK_WHOLE_SIZE should take the dynamic offset into consideration as well, and therefore, the specifications for vkCmdBindDescriptorSets() should be updated to state the VK_WHOLE_SIZE interactions that the specifications for VkDescriptorBufferInfo() describe.

@Rainer-1 Rainer-1 changed the title Correct vague vkCmdBindDescriptorSets() specifications. Vague vkCmdBindDescriptorSets() specifications. May 5, 2021
@sfricke-samsung sfricke-samsung self-assigned this May 24, 2021
@sfricke-samsung
Copy link

@Rainer-1 sorry for the delay - I raised #1546 to make sure I make the spec more clear as this recently also came up in a Validation Layer issue

As for how this part of the spec works, the sample given in
KhronosGroup/Vulkan-ValidationLayers#2846 (comment)
is how VK_WHOLE_SIZE "effiective range" is supposed to work.

@Rainer-1
Copy link
Author

Rainer-1 commented Jun 8, 2021

@sfricke-samsung Thank you for the clarification. Should I close this issue, or should I keep it open until #1546 is closed?

@sfricke-samsung
Copy link

Lets close this as #1546 is where the internal issue is being tracked from.

Also with the clarification above, the scope of this issue seems done and more concerns/comments can be raised on the other issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants