vkSetPrivateDataEXT(3)

# vkSetPrivateDataEXT(3) Manual Page

## Name

vkSetPrivateDataEXT - Associate data with a Vulkan object

Loading… please wait.

## C Specification

To store user defined data in a slot associated with a Vulkan object, call:

    // Provided by VK_EXT_private_data
    VkResult vkSetPrivateDataEXT(
        VkDevice                                    device,
        VkObjectType                                objectType,
        uint64_t                                    objectHandle,
        VkPrivateDataSlotEXT                        privateDataSlot,
        uint64_t                                    data);

## Parameters

- `device` is the device that created the object.

- `objectType` is a VkObjectType specifying the type of object to associate data with.

- `objectHandle` is a handle to the object to associate data with.

- `privateDataSlot` is a handle to a VkPrivateDataSlotEXT specifying location of private data storage.

- `data` is user defined data to associate the object with. This data will be stored at `privateDataSlot`.

## Description

Valid Usage

- VUID-vkSetPrivateDataEXT-objectHandle-04016
  `objectHandle` must be `device` or a child of `device`

- VUID-vkSetPrivateDataEXT-objectHandle-04017
  `objectHandle` must be a valid handle to an object of type `objectType`

Valid Usage (Implicit)

- VUID-vkSetPrivateDataEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkSetPrivateDataEXT-objectType-parameter
  `objectType` must be a valid VkObjectType value

- VUID-vkSetPrivateDataEXT-privateDataSlot-parameter
  `privateDataSlot` must be a valid VkPrivateDataSlotEXT handle

- VUID-vkSetPrivateDataEXT-privateDataSlot-parent
  `privateDataSlot` must have been created, allocated, or retrieved from `device`

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

## See Also

VkDevice, VkObjectType, VkPrivateDataSlotEXT

## 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

Copyright 2014-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0