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

Why can vkFreeDescriptorSets fail when every other resource releasing functions can't? #1070

Closed
oddlama opened this issue Oct 22, 2019 · 5 comments

Comments

@oddlama
Copy link

oddlama commented Oct 22, 2019

Any function that releases a resource, (such as vkDestroy* and vkFree*) cannot fail.
With the sole exception of vkFreeDescriptorSets.

vkFreeDescriptorSets can fail with both VK_ERROR_OUT_OF_HOST_MEMORY and VK_ERROR_OUT_OF_DEVICE_MEMORY.

The specification does not provide reasoning for this, and it complicates error handling in language bindings which such as Vulkan-Hpp (See PR#338 in Vulkan-Hpp).

It would be great to know more about the reasoning behind this decision.

@NicolBolas
Copy link

Note that vkResetDescriptorPool can also fail.

@oddhack
Copy link
Contributor

oddhack commented Oct 28, 2019

We already have an internal discussion going on about this. It appears this was probably an oversight, and if we can establish that all implementations only return successfully, we'll probably add a restriction to the allowed return value and a Note explaining the discrepancy. We are unlikely to actually change the API to remove the return value, however.

@oddlama
Copy link
Author

oddlama commented Oct 28, 2019

That is good to hear. Please tell us when you have come to a conclusion internally.

@krOoze
Copy link
Contributor

krOoze commented Nov 18, 2019

Seems fixed in 1.1.128

@oddhack
Copy link
Contributor

oddhack commented Nov 18, 2019

Yes, thanks. Lost track of the internal / external issue association.

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

No branches or pull requests

4 participants