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

Vulkan backend: remove call to RemoveTexture() #7307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shawnhatori
Copy link
Contributor

@shawnhatori shawnhatori commented Feb 12, 2024

RemoveTexture() tries to free a descriptor set on shutdown, which requires the caller to provide a descriptor pool with VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT set. If the pool does not have this set, it is a validation error. I don't think this is a restriction the backend should impose. Since it's the caller's responsibility to provide the pool, it should be the caller's responsibility to free the pool on shutdown (which frees the descriptor sets therein).

The easiest way to integrate with this Vulkan backend is to take your existing descriptor pool (used for whatever else in your application), accommodate the necessary space for what ImGui needs, and provide that. Removing the requirement for the aforementioned bitmask flag allows you to do so without having to change the characteristics of your pool.

@shawnhatori
Copy link
Contributor Author

shawnhatori commented Feb 12, 2024

For reference, the mentioned validation error is listed in the documentation here:
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkFreeDescriptorSets.html#VUID-vkFreeDescriptorSets-descriptorPool-00312

@shawnhatori shawnhatori changed the title Vulkan backend: remove call to RemoveTexture(), correct comment Vulkan backend: remove call to RemoveTexture() Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants