Function Prototype

vkGetPrivateData

Retrieve data associated with a Vulkan object

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

void vkGetPrivateDataEXT(
    VkDevice device,
    VkObjectType objectType,
    uint64_t objectHandle,
    VkPrivateDataSlot 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 VkPrivateDataSlot specifying location of private data pointer storage.
  • pData is a pointer to specify where application-defined data is returned. 0 will be written in the absence of a previous call to vkSetPrivateData using the object specified by objectHandle.

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

Valid Usage

VUID-vkGetPrivateData-objectType-04018

objectHandle must be device or a child of device

VUID-vkGetPrivateData-objectHandle-09498

objectHandle must be a valid handle to an object of type objectType

Valid Usage (Implicit)

VUID-vkGetPrivateData-pData-parameter

pData must be a valid pointer to a uint64_t value

VUID-vkGetPrivateData-privateDataSlot-parent

privateDataSlot must have been created, allocated, or retrieved from device