VulkanMemoryAllocator icon indicating copy to clipboard operation
VulkanMemoryAllocator copied to clipboard

Document error codes

Open Majora320 opened this issue 5 months ago • 1 comments

It would be useful to have documentation about how different functions can fail, similar to how the Vulkan spec lists possible error codes for each operation. This should be possible by unioning the possible error codes from called Vulkan functions for each VMA function, and combining them with whatever Vulkan error codes VMA uses itself, maybe with a little bit of documentation for the latter case. Not a high priority issue, but it would be nice to have.

Majora320 avatar Jun 13 '25 03:06 Majora320

Thank you for the suggestion. Can you please explain how such list of error codes included in the documentation of each function could be used in practice?

I don't think is is very useful, while creating and maintaining it would require a lot of work.

Whenever a specific returned value has a specific meaning (like in vmaFindMemoryTypeIndex), it is documented. Otherwise, it should be assumed that every code other than VK_SUCCESS indicates "an error" (as in - the operation failed).

Vulkan and DX12 functions are known to return error codes beyond the official list anyway, so even graphics drivers don't always obey this specification.

sawickiap avatar Jun 16 '25 12:06 sawickiap