Validation error when using custom VkAllocationCallbacks
Closed this issue · 1 comments
ceeac commented
Description
Running an app in RenderDoc with custom VkAllocationCallbacks
results in the following validation error when vkDestroyInstance
is called:
VUID-vkDestroyInstance-instance-00630(ERROR / SPEC): msgNum: -1750638 - Validation Error: [ VUID-vkDestroyInstance-instance-00630 ] Object 0: handle = 0x5559af5159b0, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xffe54992 | vkDestroyInstance(): Custom allocator not specified while destroying VkInstance obj 0x5559af5159b0 but specified at creation. The Vulkan spec states: If VkAllocationCallbacks were provided when instance was created, a compatible set of callbacks must be provided here (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyInstance-instance-00630)
Objects: 1
[0] 0x5559af5159b0, type: 1, name: NULL
The error does not appear when the app is started without RenderDoc with Validation Layers enabled (and all calls to vkDestroyInstance
already use the custom memory allocator).
A quick check suggests that https://github.com/baldurk/renderdoc/blame/89166801fa83de20e6e96b476fc30e034a20a867/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp#L1091 might be the issue, but I have not tested this yet.
Steps to reproduce
- Call
vkCreateInstance
with non-NULLVkAllocationCallbacks
pointer - Call
vkDestroyInstance
with same pointer
Environment
- RenderDoc version: QRenderDoc v1.32 (8916680)
- Operating System: Ubuntu 22.04
- Graphics API: Vulkan 1.0
- GPU: Nvidia GTX 1080
- driver version: v535.161.7.0 (proprietary driver)
baldurk commented
That commit should ensure that the allocators passed to all functions are consistent.