C Specification

To retrieve user defined data from a slot associated with a Vulkan object, call:

// Provided by VK_EXT_private_data
void vkGetPrivateDataEXT(
    VkDevice                                    device,
    VkObjectType                                objectType,
    uint64_t                                    objectHandle,
    VkPrivateDataSlotEXT                        privateDataSlot,
    uint64_t*                                   pData);


  • device is the device that created the object

  • objectType is a VkObjectType specifying the type of object data is associated with.

  • objectHandle is a handle to the object data is associated with.

  • privateDataSlot is a handle to a VkPrivateDataSlotEXT specifying location of private data pointer storage.

  • pData is a pointer to specify where user data is returned. 0 will be written in the absence of a previous call to vkSetPrivateDataEXT using the object specified by objectHandle.



Due to platform details on Android, implementations might not be able to reliably return 0 from calls to vkGetPrivateDataEXT for VkSwapchainKHR objects on which vkSetPrivateDataEXT has not previously been called. This erratum is exclusive to the Android platform and objects of type VkSwapchainKHR.

Valid Usage
  • VUID-vkGetPrivateDataEXT-objectType-04018
    objectType must be VK_OBJECT_TYPE_DEVICE, or an object type whose parent is VkDevice

Valid Usage (Implicit)
  • VUID-vkGetPrivateDataEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetPrivateDataEXT-objectType-parameter
    objectType must be a valid VkObjectType value

  • VUID-vkGetPrivateDataEXT-privateDataSlot-parameter
    privateDataSlot must be a valid VkPrivateDataSlotEXT handle

  • VUID-vkGetPrivateDataEXT-pData-parameter
    pData must be a valid pointer to a uint64_t value

  • VUID-vkGetPrivateDataEXT-privateDataSlot-parent
    privateDataSlot must have been created, allocated, or retrieved from device

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0