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

org.lwjgl.vulkan.NVExternalMemoryCapabilities 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 org.lwjgl.system.*;

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

/**
 * Applications may wish to import memory from the Direct 3D API, or export memory to other Vulkan instances. This extension provides a set of capability queries that allow applications determine what types of win32 memory handles an implementation supports for a given set of use cases.
 * 
 * 
*
Name String
*
{@code VK_NV_external_memory_capabilities}
*
Extension Type
*
Instance extension
*
Registered Extension Number
*
56
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
*
Contact
*
    *
  • James Jones @cubanismo
  • *
*
Last Modified Date
*
2016-08-19
*
IP Status
*
No known IP claims.
*
Interactions and External Dependencies
*
    *
  • Interacts with VK_KHR_dedicated_allocation.
  • *
  • Interacts with VK_NV_dedicated_allocation.
  • *
*
Contributors
*
    *
  • James Jones, NVIDIA
  • *
*
*/ public class NVExternalMemoryCapabilities { /** The extension specification version. */ public static final int VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_NV_external_memory_capabilities"; /** * VkExternalMemoryHandleTypeFlagBitsNV - Bitmask specifying external memory handle types * *
Description
* *
    *
  • {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV} indicates a handle to memory returned by {@link NVExternalMemoryWin32#vkGetMemoryWin32HandleNV GetMemoryWin32HandleNV}.
  • *
  • {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV} indicates a handle to memory returned by {@link NVExternalMemoryWin32#vkGetMemoryWin32HandleNV GetMemoryWin32HandleNV}, or one duplicated from such a handle using {@code DuplicateHandle()}.
  • *
  • {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV} indicates a valid NT handle to memory returned by {@code IDXGIResource1::ftext:CreateSharedHandle()}, or a handle duplicated from such a handle using {@code DuplicateHandle()}.
  • *
  • {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV} indicates a handle to memory returned by {@code IDXGIResource::GetSharedHandle()}.
  • *
* *
See Also
* *

{@code VkExternalMemoryHandleTypeFlagsNV}

*/ public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x1, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x2, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x4, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x8; /** * VkExternalMemoryFeatureFlagBitsNV - Bitmask specifying external memory features * *
Description
* *
    *
  • {@link #VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV} indicates that external memory of the specified type must be created as a dedicated allocation when used in the manner specified.
  • *
  • {@link #VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV} indicates that the implementation supports exporting handles of the specified type.
  • *
  • {@link #VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV} indicates that the implementation supports importing handles of the specified type.
  • *
* *
See Also
* *

{@link VkExternalImageFormatPropertiesNV}, {@code VkExternalMemoryFeatureFlagsNV}, {@link #vkGetPhysicalDeviceExternalImageFormatPropertiesNV GetPhysicalDeviceExternalImageFormatPropertiesNV}

*/ public static final int VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x1, VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x2, VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x4; protected NVExternalMemoryCapabilities() { throw new UnsupportedOperationException(); } static boolean isAvailable(VKCapabilitiesInstance caps) { return checkFunctions( caps.vkGetPhysicalDeviceExternalImageFormatPropertiesNV ); } // --- [ vkGetPhysicalDeviceExternalImageFormatPropertiesNV ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceExternalImageFormatPropertiesNV GetPhysicalDeviceExternalImageFormatPropertiesNV} */ public static int nvkGetPhysicalDeviceExternalImageFormatPropertiesNV(VkPhysicalDevice physicalDevice, int format, int type, int tiling, int usage, int flags, int externalHandleType, long pExternalImageFormatProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceExternalImageFormatPropertiesNV; if (CHECKS) { check(__functionAddress); } return callPPI(__functionAddress, physicalDevice.address(), format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties); } /** * determine image capabilities compatible with external memory handle types. * *
C Specification
* *

To determine the image capabilities compatible with an external memory handle type, call:

* *
     * VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkFormat                                    format,
     *     VkImageType                                 type,
     *     VkImageTiling                               tiling,
     *     VkImageUsageFlags                           usage,
     *     VkImageCreateFlags                          flags,
     *     VkExternalMemoryHandleTypeFlagsNV           externalHandleType,
     *     VkExternalImageFormatPropertiesNV*          pExternalImageFormatProperties);
* *
Description
* *

If {@code externalHandleType} is 0, {@code pExternalImageFormatProperties}::imageFormatProperties will return the same values as a call to {@link VK10#vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties}, and the other members of {@code pExternalImageFormatProperties} will all be 0. Otherwise, they are filled in as described for {@link VkExternalImageFormatPropertiesNV}.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code format} must be a valid {@code VkFormat} value
  • *
  • {@code type} must be a valid {@code VkImageType} value
  • *
  • {@code tiling} must be a valid {@code VkImageTiling} value
  • *
  • {@code usage} must be a valid combination of {@code VkImageUsageFlagBits} values
  • *
  • {@code usage} must not be 0
  • *
  • {@code flags} must be a valid combination of {@code VkImageCreateFlagBits} values
  • *
  • {@code externalHandleType} must be a valid combination of {@code VkExternalMemoryHandleTypeFlagBitsNV} values
  • *
  • {@code pExternalImageFormatProperties} must be a pointer to a {@link VkExternalImageFormatPropertiesNV} structure
  • *
* *
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}
  • *
  • {@link VK10#VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link VK10#VK_ERROR_FORMAT_NOT_SUPPORTED ERROR_FORMAT_NOT_SUPPORTED}
  • *
*
* *
See Also
* *

{@link VkExternalImageFormatPropertiesNV}

* * @param physicalDevice the physical device from which to query the image capabilities * @param format the image format, corresponding to {@link VkImageCreateInfo}{@code ::format}. * @param type the image type, corresponding to {@link VkImageCreateInfo}{@code ::imageType}. * @param tiling the image tiling, corresponding to {@link VkImageCreateInfo}{@code ::tiling}. * @param usage the intended usage of the image, corresponding to {@link VkImageCreateInfo}{@code ::usage}. * @param flags a bitmask describing additional parameters of the image, corresponding to {@link VkImageCreateInfo}{@code ::flags}. * @param externalHandleType either one of the bits from {@code VkExternalMemoryHandleTypeFlagBitsNV}, or 0. * @param pExternalImageFormatProperties points to an instance of the {@link VkExternalImageFormatPropertiesNV} structure in which capabilities are returned. */ @NativeType("VkResult") public static int vkGetPhysicalDeviceExternalImageFormatPropertiesNV(VkPhysicalDevice physicalDevice, @NativeType("VkFormat") int format, @NativeType("VkImageType") int type, @NativeType("VkImageTiling") int tiling, @NativeType("VkImageUsageFlags") int usage, @NativeType("VkImageCreateFlags") int flags, @NativeType("VkExternalMemoryHandleTypeFlagsNV") int externalHandleType, @NativeType("VkExternalImageFormatPropertiesNV *") VkExternalImageFormatPropertiesNV pExternalImageFormatProperties) { return nvkGetPhysicalDeviceExternalImageFormatPropertiesNV(physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties.address()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy