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

Validation error when using custom VkAllocationCallbacks #3263

Closed
ceeac opened this issue Feb 28, 2024 · 1 comment
Closed

Validation error when using custom VkAllocationCallbacks #3263

ceeac opened this issue Feb 28, 2024 · 1 comment
Labels
Bug A crash, misbehaviour, or other problem Unresolved Waiting for a fix or implementation

Comments

@ceeac
Copy link

ceeac commented Feb 28, 2024

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-NULL VkAllocationCallbacks 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 baldurk added Bug A crash, misbehaviour, or other problem Unresolved Waiting for a fix or implementation labels Feb 28, 2024
@baldurk
Copy link
Owner

baldurk commented Feb 28, 2024

That commit should ensure that the allocators passed to all functions are consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A crash, misbehaviour, or other problem Unresolved Waiting for a fix or implementation
Projects
None yet
Development

No branches or pull requests

2 participants