1// Copyright 2020-2023 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5include::{generated}/meta/{refprefix}VK_EXT_private_data.adoc[]
6
7=== Other Extension Metadata
8
9*Last Modified Date*::
10    2020-03-25
11*Interactions and External Dependencies*::
12  - Promoted to Vulkan 1.3 Core
13*IP Status*::
14    No known IP claims.
15*Contributors*::
16  - Matthew Rusch, NVIDIA
17  - Nuno Subtil, NVIDIA
18  - Piers Daniell, NVIDIA
19  - Jeff Bolz, NVIDIA
20
21=== Description
22
23This extension is a device extension which enables attaching arbitrary
24payloads to Vulkan objects.
25It introduces the idea of private data slots as a means of storing a 64-bit
26unsigned integer of application defined data.
27Private data slots can be created or destroyed any time an associated device
28is available.
29Private data slots can be reserved at device creation time, and limiting use
30to the amount reserved will allow the extension to exhibit better
31performance characteristics.
32
33include::{generated}/interfaces/VK_EXT_private_data.adoc[]
34
35=== Promotion to Vulkan 1.3
36
37Functionality in this extension is included in core Vulkan 1.3, with the EXT
38suffix omitted.
39The original type, enum and command names are still available as aliases of
40the core functionality.
41
42=== Examples
43
44  * In progress
45
46=== Issues
47
48(1) If I have to create a slink:VkPrivateDataSlot to store and retrieve data
49on an object, how does this extension help me? Will I not need to store the
50slink:VkPrivateDataSlot mapping with each object, and if I am doing that, I
51might as well just store the original data!
52--
53**RESOLVED:** The slink:VkPrivateDataSlot can be thought of as an opaque
54index into storage that is reserved in each object.
55That is, you can use the same slink:VkPrivateDataSlot with each object for a
56specific piece of information.
57For example, if a layer wishes to track per-object information, the layer
58only needs to allocate one slink:VkPrivateDataSlot per device and it can use
59that private data slot for all of the device's child objects.
60This allows multiple layers to store private data without conflicting with
61each other's and/or the application's private data.
62--
63
64(2) What if I need to store more than 64-bits of information per object?
65--
66**RESOLVED:** The data that you store per object could be a pointer to
67another object or structure of your own allocation.
68--
69
70=== Version History
71
72  * Revision 1, 2020-01-15 (Matthew Rusch)
73  ** Initial draft
74