All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.EXTPrivateData Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.vulkan;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;

/**
 * The 'VK_EXT_private_data' extension is a device extension which enables attaching arbitrary payloads to Vulkan objects. It introduces the idea of private data slots as a means of storing a 64-bit unsigned integer of application defined data. Private data slots can be created or destroyed any time an associated device is available. Private data slots can be reserved at device creation time, and limiting use to the amount reserved will allow the extension to exhibit better performance characteristics.
 * 
 * 
Examples
* *
    *
  • In progress
  • *
* *
VK_EXT_private_data
* *
*
Name String
*
{@code VK_EXT_private_data}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
296
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
*
Contact
*
*
* *
Other Extension Metadata
* *
*
Last Modified Date
*
2020-03-25
*
IP Status
*
No known IP claims.
*
Contributors
*
    *
  • Matthew Rusch, NVIDIA
  • *
  • Nuno Subtil, NVIDIA
  • *
  • Piers Daniell, NVIDIA
  • *
  • Jeff Bolz, NVIDIA
  • *
*
*/ public class EXTPrivateData { /** The extension specification version. */ public static final int VK_EXT_PRIVATE_DATA_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_EXT_PRIVATE_DATA_EXTENSION_NAME = "VK_EXT_private_data"; /** * Extends {@code VkStructureType}. * *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT}
  • *
  • {@link #VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT}
  • *
  • {@link #VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT}
  • *
*/ public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = 1000295000, VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = 1000295001, VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT = 1000295002; /** Extends {@code VkObjectType}. */ public static final int VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT = 1000295000; protected EXTPrivateData() { throw new UnsupportedOperationException(); } // --- [ vkCreatePrivateDataSlotEXT ] --- /** Unsafe version of: {@link #vkCreatePrivateDataSlotEXT CreatePrivateDataSlotEXT} */ public static int nvkCreatePrivateDataSlotEXT(VkDevice device, long pCreateInfo, long pAllocator, long pPrivateDataSlot) { long __functionAddress = device.getCapabilities().vkCreatePrivateDataSlotEXT; if (CHECKS) { check(__functionAddress); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pPrivateDataSlot, __functionAddress); } /** * Create a slot for private data storage. * *
C Specification
* *

To create a private data slot, call:

* *

     * VkResult vkCreatePrivateDataSlotEXT(
     *     VkDevice                                    device,
     *     const VkPrivateDataSlotCreateInfoEXT*       pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkPrivateDataSlotEXT*                       pPrivateDataSlot);
* *
Valid Usage
* * * *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkPrivateDataSlotCreateInfoEXT} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pPrivateDataSlot} must be a valid pointer to a {@code VkPrivateDataSlotEXT} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link VK10#VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkPrivateDataSlotCreateInfoEXT}

* * @param device the logical device associated with the creation of the object(s) holding the private data slot. * @param pCreateInfo a pointer to a {@link VkPrivateDataSlotCreateInfoEXT} * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pPrivateDataSlot a pointer to a {@code VkPrivateDataSlotEXT} handle in which the resulting private data slot is returned */ @NativeType("VkResult") public static int vkCreatePrivateDataSlotEXT(VkDevice device, @NativeType("VkPrivateDataSlotCreateInfoEXT const *") VkPrivateDataSlotCreateInfoEXT pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPrivateDataSlotEXT *") LongBuffer pPrivateDataSlot) { if (CHECKS) { check(pPrivateDataSlot, 1); } return nvkCreatePrivateDataSlotEXT(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pPrivateDataSlot)); } // --- [ vkDestroyPrivateDataSlotEXT ] --- /** Unsafe version of: {@link #vkDestroyPrivateDataSlotEXT DestroyPrivateDataSlotEXT} */ public static void nvkDestroyPrivateDataSlotEXT(VkDevice device, long privateDataSlot, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyPrivateDataSlotEXT; if (CHECKS) { check(__functionAddress); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), privateDataSlot, pAllocator, __functionAddress); } /** * Destroy a private data slot. * *
C Specification
* *

To destroy a private data slot, call:

* *

     * void vkDestroyPrivateDataSlotEXT(
     *     VkDevice                                    device,
     *     VkPrivateDataSlotEXT                        privateDataSlot,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • If {@link VkAllocationCallbacks} were provided when {@code privateDataSlot} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code privateDataSlot} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code privateDataSlot} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code privateDataSlot} must be a valid {@code VkPrivateDataSlotEXT} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code privateDataSlot} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code privateDataSlot} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device associated with the creation of the object(s) holding the private data slot. * @param privateDataSlot the private data slot to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyPrivateDataSlotEXT(VkDevice device, @NativeType("VkPrivateDataSlotEXT") long privateDataSlot, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyPrivateDataSlotEXT(device, privateDataSlot, memAddressSafe(pAllocator)); } // --- [ vkSetPrivateDataEXT ] --- /** * Associate data with a Vulkan object. * *
C Specification
* *

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

* *

     * VkResult vkSetPrivateDataEXT(
     *     VkDevice                                    device,
     *     VkObjectType                                objectType,
     *     uint64_t                                    objectHandle,
     *     VkPrivateDataSlotEXT                        privateDataSlot,
     *     uint64_t                                    data);
* *
Valid Usage
* *
    *
  • {@code objectHandle} must be {@code device} or a child of {@code device}
  • *
  • {@code objectHandle} must be a valid handle to an object of type {@code objectType}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code objectType} must be a valid {@code VkObjectType} value
  • *
  • {@code privateDataSlot} must be a valid {@code VkPrivateDataSlotEXT} handle
  • *
  • {@code privateDataSlot} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link VK10#VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
*
* * @param device the device that created the object. * @param objectType a {@code VkObjectType} specifying the type of object to associate data with. * @param objectHandle a handle to the object to associate data with. * @param privateDataSlot a handle to a {@code VkPrivateDataSlotEXT} specifying location of private data storage. * @param data user defined data to associate the object with. This data will be stored at {@code privateDataSlot}. */ @NativeType("VkResult") public static int vkSetPrivateDataEXT(VkDevice device, @NativeType("VkObjectType") int objectType, @NativeType("uint64_t") long objectHandle, @NativeType("VkPrivateDataSlotEXT") long privateDataSlot, @NativeType("uint64_t") long data) { long __functionAddress = device.getCapabilities().vkSetPrivateDataEXT; if (CHECKS) { check(__functionAddress); } return callPJJJI(device.address(), objectType, objectHandle, privateDataSlot, data, __functionAddress); } // --- [ vkGetPrivateDataEXT ] --- /** Unsafe version of: {@link #vkGetPrivateDataEXT GetPrivateDataEXT} */ public static void nvkGetPrivateDataEXT(VkDevice device, int objectType, long objectHandle, long privateDataSlot, long pData) { long __functionAddress = device.getCapabilities().vkGetPrivateDataEXT; if (CHECKS) { check(__functionAddress); } callPJJPV(device.address(), objectType, objectHandle, privateDataSlot, pData, __functionAddress); } /** * Retrieve data associated with a Vulkan object. * *
C Specification
* *

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

* *

     * void vkGetPrivateDataEXT(
     *     VkDevice                                    device,
     *     VkObjectType                                objectType,
     *     uint64_t                                    objectHandle,
     *     VkPrivateDataSlotEXT                        privateDataSlot,
     *     uint64_t*                                   pData);
* *
Description
* *
Note
* *

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

*
* *
Valid Usage
* *
    *
  • {@code objectType} must be {@link VK10#VK_OBJECT_TYPE_DEVICE OBJECT_TYPE_DEVICE}, or an object type whose parent is {@code VkDevice}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code objectType} must be a valid {@code VkObjectType} value
  • *
  • {@code privateDataSlot} must be a valid {@code VkPrivateDataSlotEXT} handle
  • *
  • {@code pData} must be a valid pointer to a {@code uint64_t} value
  • *
  • {@code privateDataSlot} must have been created, allocated, or retrieved from {@code device}
  • *
* * @param device the device that created the object * @param objectType a {@code VkObjectType} specifying the type of object data is associated with. * @param objectHandle a handle to the object data is associated with. * @param privateDataSlot a handle to a {@code VkPrivateDataSlotEXT} specifying location of private data pointer storage. * @param pData a pointer to specify where user data is returned. 0 will be written in the absence of a previous call to {@code vkSetPrivateDataEXT} using the object specified by {@code objectHandle}. */ public static void vkGetPrivateDataEXT(VkDevice device, @NativeType("VkObjectType") int objectType, @NativeType("uint64_t") long objectHandle, @NativeType("VkPrivateDataSlotEXT") long privateDataSlot, @NativeType("uint64_t *") LongBuffer pData) { if (CHECKS) { check(pData, 1); } nvkGetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, memAddress(pData)); } /** Array version of: {@link #vkCreatePrivateDataSlotEXT CreatePrivateDataSlotEXT} */ @NativeType("VkResult") public static int vkCreatePrivateDataSlotEXT(VkDevice device, @NativeType("VkPrivateDataSlotCreateInfoEXT const *") VkPrivateDataSlotCreateInfoEXT pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPrivateDataSlotEXT *") long[] pPrivateDataSlot) { long __functionAddress = device.getCapabilities().vkCreatePrivateDataSlotEXT; if (CHECKS) { check(__functionAddress); check(pPrivateDataSlot, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pPrivateDataSlot, __functionAddress); } /** Array version of: {@link #vkGetPrivateDataEXT GetPrivateDataEXT} */ public static void vkGetPrivateDataEXT(VkDevice device, @NativeType("VkObjectType") int objectType, @NativeType("uint64_t") long objectHandle, @NativeType("VkPrivateDataSlotEXT") long privateDataSlot, @NativeType("uint64_t *") long[] pData) { long __functionAddress = device.getCapabilities().vkGetPrivateDataEXT; if (CHECKS) { check(__functionAddress); check(pData, 1); } callPJJPV(device.address(), objectType, objectHandle, privateDataSlot, pData, __functionAddress); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy