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

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

import org.lwjgl.system.*;

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

/**
 * An application using external memory may wish to synchronize access to that memory using fences. This extension enables an application to export fence payload to and import fence payload from Windows handles.
 * 
 * 
*
Name String
*
{@code VK_KHR_external_fence_win32}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
115
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link KHRExternalFence VK_KHR_external_fence}
  • *
*
Contact
*
    *
  • Jesse Hall @jessehall
  • *
*
Last Modified Date
*
2017-05-08
*
IP Status
*
No known IP claims.
*
Contributors
*
    *
  • Jesse Hall, Google
  • *
  • James Jones, NVIDIA
  • *
  • Jeff Juliano, NVIDIA
  • *
  • Cass Everitt, Oculus
  • *
  • Contributors to {@link KHRExternalSemaphoreWin32 VK_KHR_external_semaphore_win32}
  • *
*
*/ public class KHRExternalFenceWin32 { /** The extension specification version. */ public static final int VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32"; /** * Extends {@code VkStructureType}. * *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR}
  • *
  • {@link #VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR}
  • *
  • {@link #VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR}
  • *
*/ public static final int VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000, VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001, VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002; protected KHRExternalFenceWin32() { throw new UnsupportedOperationException(); } static boolean isAvailable(VKCapabilitiesDevice caps) { return checkFunctions( caps.vkImportFenceWin32HandleKHR, caps.vkGetFenceWin32HandleKHR ); } // --- [ vkImportFenceWin32HandleKHR ] --- /** Unsafe version of: {@link #vkImportFenceWin32HandleKHR ImportFenceWin32HandleKHR} */ public static int nvkImportFenceWin32HandleKHR(VkDevice device, long pImportFenceWin32HandleInfo) { long __functionAddress = device.getCapabilities().vkImportFenceWin32HandleKHR; if (CHECKS) { check(__functionAddress); VkImportFenceWin32HandleInfoKHR.validate(pImportFenceWin32HandleInfo); } return callPPI(__functionAddress, device.address(), pImportFenceWin32HandleInfo); } /** * Import a fence from a Windows HANDLE. * *
C Specification
* *

To import a fence payload from a Windows handle, call:

* *
     * VkResult vkImportFenceWin32HandleKHR(
     *     VkDevice                                    device,
     *     const VkImportFenceWin32HandleInfoKHR*      pImportFenceWin32HandleInfo);
* *
Description
* *

Importing a fence payload from Windows handles does not transfer ownership of the handle to the Vulkan implementation. For handle types defined as NT handles, the application must release ownership using the fname:CloseHandle system call when the handle is no longer needed.

* *

Applications can import the same fence payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pImportFenceWin32HandleInfo} must be a valid pointer to a valid {@link VkImportFenceWin32HandleInfoKHR} 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 KHRExternalMemory#VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR ERROR_INVALID_EXTERNAL_HANDLE_KHR}
  • *
*
* *
See Also
* *

{@link VkImportFenceWin32HandleInfoKHR}

* * @param device the logical device that created the fence. * @param pImportFenceWin32HandleInfo points to a {@link VkImportFenceWin32HandleInfoKHR} structure specifying the fence and import parameters. */ @NativeType("VkResult") public static int vkImportFenceWin32HandleKHR(VkDevice device, @NativeType("const VkImportFenceWin32HandleInfoKHR *") VkImportFenceWin32HandleInfoKHR pImportFenceWin32HandleInfo) { return nvkImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo.address()); } // --- [ vkGetFenceWin32HandleKHR ] --- /** Unsafe version of: {@link #vkGetFenceWin32HandleKHR GetFenceWin32HandleKHR} */ public static int nvkGetFenceWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle) { long __functionAddress = device.getCapabilities().vkGetFenceWin32HandleKHR; if (CHECKS) { check(__functionAddress); } return callPPPI(__functionAddress, device.address(), pGetWin32HandleInfo, pHandle); } /** * Get a Windows HANDLE for a fence. * *
C Specification
* *

To export a Windows handle representing the state of a fence, call:

* *
     * VkResult vkGetFenceWin32HandleKHR(
     *     VkDevice                                    device,
     *     const VkFenceGetWin32HandleInfoKHR*         pGetWin32HandleInfo,
     *     HANDLE*                                     pHandle);
* *
Description
* *

For handle types defined as NT handles, the handles returned by {@link #vkGetFenceWin32HandleKHR GetFenceWin32HandleKHR} are owned by the application. To avoid leaking resources, the application must release ownership of them using the fname:CloseHandle system call when they are no longer needed.

* *

Exporting a Windows handle from a fence may have side effects depending on the transference of the specified handle type, as described in Importing Fence Payloads.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pGetWin32HandleInfo} must be a valid pointer to a valid {@link VkFenceGetWin32HandleInfoKHR} structure
  • *
  • {@code pHandle} must be a valid pointer to a {@code HANDLE} value
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link VK10#VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link VK10#VK_ERROR_TOO_MANY_OBJECTS ERROR_TOO_MANY_OBJECTS}
  • *
  • {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
*
* *
See Also
* *

{@link VkFenceGetWin32HandleInfoKHR}

* * @param device the logical device that created the fence being exported. * @param pGetWin32HandleInfo a pointer to an instance of the {@link VkFenceGetWin32HandleInfoKHR} structure containing parameters of the export operation. * @param pHandle will return the Windows handle representing the fence state. */ @NativeType("VkResult") public static int vkGetFenceWin32HandleKHR(VkDevice device, @NativeType("const VkFenceGetWin32HandleInfoKHR *") VkFenceGetWin32HandleInfoKHR pGetWin32HandleInfo, @NativeType("HANDLE *") PointerBuffer pHandle) { if (CHECKS) { check(pHandle, 1); } return nvkGetFenceWin32HandleKHR(device, pGetWin32HandleInfo.address(), memAddress(pHandle)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy