Module vulkano::device::private_data
source · Expand description
Store user-defined data associated with Vulkan objects.
A private data slot allows you to associate an arbitrary u64
value with any device-owned
Vulkan object. Each private data slot can store one value per object, but you can use the
value to look up a larger amount of data in a collection such as a HashMap
.
The intended usage is to create one private data slot for every subsystem in your program that needs to assign data to objects independently of the others. That way, different parts of a program manage their own private data and don’t interfere with each other’s data.
When creating a device, it is possible to reserve private data slots ahead of time using
DeviceCreateInfo::private_data_slot_request_count
. This is not necessary, but it can
speed up the use of data slots later.
Structs
- An object that stores one
u64
value per Vulkan object. - Parameters to create a new
PrivateDataSlot
.