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

org.lwjgl.vulkan.NVAcquireWinrtDisplay 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 java.nio.*;

import org.lwjgl.system.*;

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

/**
 * This extension allows an application to take exclusive control of a display on Windows 10 provided that the display is not already controlled by a compositor. Examples of compositors include the Windows desktop compositor, other applications using this Vulkan extension, and applications that “{@code Acquire}” a “{@code DisplayTarget}” using a “{@code WinRT}” command such as “{@code winrt::Windows::Devices::Display::Core::DisplayManager.TryAcquireTarget()}”.
 * 
 * 

When control is acquired the application has exclusive access to the display until control is released or the application terminates. An application’s attempt to acquire is denied if a different application has already acquired the display.

* *
VK_NV_acquire_winrt_display
* *
*
Name String
*
{@code VK_NV_acquire_winrt_display}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
346
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link EXTDirectModeDisplay VK_EXT_direct_mode_display}
  • *
*
Contact
*
*
* *
Other Extension Metadata
* *
*
Last Modified Date
*
2020-09-29
*
IP Status
*
No known IP claims.
*
Contributors
*
    *
  • Jeff Juliano, NVIDIA
  • *
*
*/ public class NVAcquireWinrtDisplay { /** The extension specification version. */ public static final int VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME = "VK_NV_acquire_winrt_display"; protected NVAcquireWinrtDisplay() { throw new UnsupportedOperationException(); } // --- [ vkAcquireWinrtDisplayNV ] --- /** * Acquire access to a VkDisplayKHR. * *
C Specification
* *

To acquire permission to directly access a display in Vulkan on Windows 10, call:

* *

     * VkResult vkAcquireWinrtDisplayNV(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkDisplayKHR                                display);
* *
Description
* *

All permissions necessary to control the display are granted to the Vulkan instance associated with {@code physicalDevice} until the display is released or the application is terminated. Permission to access the display may be revoked by events that cause Windows 10 itself to lose access to {@code display}. If this has happened, operations which require access to the display must fail with an appropriate error code. If permission to access {@code display} has already been acquired by another entity, the call must return the error code {@link VK10#VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}.

* *
Note
* *

The Vulkan instance acquires control of a “{@code winrt::Windows::Devices::Display::Core::DisplayTarget}” by performing an operation equivalent to “{@code winrt::Windows::Devices::Display::Core::DisplayManager.TryAcquireTarget()}” on the “{@code DisplayTarget}”.

*
* *
Note
* *

One example of when Windows 10 loses access to a display is when the display is hot-unplugged.

*
* *
Note
* *

One example of when a display has already been acquired by another entity is when the Windows desktop compositor (DWM) is in control of the display. Beginning with Windows 10 version 2004 it is possible to cause DWM to release a display by using the “{@code Advanced display settings}” sub-page of the “{@code Display settings}” control panel. {@link #vkAcquireWinrtDisplayNV AcquireWinrtDisplayNV} does not itself cause DWM to release a display; this action must be performed outside of Vulkan.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code display} must be a valid {@code VkDisplayKHR} handle
  • *
  • {@code display} must have been created, allocated, or retrieved from {@code physicalDevice}
  • *
* *
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_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
  • {@link VK10#VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
  • *
*
* * @param physicalDevice The physical device the display is on. * @param display The display the caller wishes to control in Vulkan. */ @NativeType("VkResult") public static int vkAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, @NativeType("VkDisplayKHR") long display) { long __functionAddress = physicalDevice.getCapabilities().vkAcquireWinrtDisplayNV; if (CHECKS) { check(__functionAddress); } return callPJI(physicalDevice.address(), display, __functionAddress); } // --- [ vkGetWinrtDisplayNV ] --- /** Unsafe version of: {@link #vkGetWinrtDisplayNV GetWinrtDisplayNV} */ public static int nvkGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, int deviceRelativeId, long pDisplay) { long __functionAddress = physicalDevice.getCapabilities().vkGetWinrtDisplayNV; if (CHECKS) { check(__functionAddress); } return callPPI(physicalDevice.address(), deviceRelativeId, pDisplay, __functionAddress); } /** * Query the VkDisplayKHR corresponding to a WinRT DisplayTarget. * *
C Specification
* *

When acquiring displays on Windows 10, an application may also wish to enumerate and identify them using a native handle rather than a {@code VkDisplayKHR} handle.

* *

To determine the {@code VkDisplayKHR} handle corresponding to a “{@code winrt::Windows::Devices::Display::Core::DisplayTarget}”, call:

* *

     * VkResult vkGetWinrtDisplayNV(
     *     VkPhysicalDevice                            physicalDevice,
     *     uint32_t                                    deviceRelativeId,
     *     VkDisplayKHR*                               pDisplay);
* *
Description
* *

If there is no {@code VkDisplayKHR} corresponding to {@code deviceRelativeId} on {@code physicalDevice}, {@link VK10#VK_NULL_HANDLE NULL_HANDLE} must be returned in {@code pDisplay}.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code pDisplay} must be a valid pointer to a {@code VkDisplayKHR} 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}
  • *
  • {@link VK10#VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
  • {@link VK10#VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
  • *
*
* * @param physicalDevice The physical device on which to query the display handle. * @param deviceRelativeId The value of the “AdapterRelativeId” property of a “DisplayTarget” that is enumerated by a “DisplayAdapter” with an “Id” property matching the {@code deviceLUID} property of a {@link VkPhysicalDeviceIDProperties} for {@code physicalDevice}. * @param pDisplay The corresponding {@code VkDisplayKHR} handle will be returned here. */ @NativeType("VkResult") public static int vkGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, @NativeType("uint32_t") int deviceRelativeId, @NativeType("VkDisplayKHR *") LongBuffer pDisplay) { if (CHECKS) { check(pDisplay, 1); } return nvkGetWinrtDisplayNV(physicalDevice, deviceRelativeId, memAddress(pDisplay)); } /** Array version of: {@link #vkGetWinrtDisplayNV GetWinrtDisplayNV} */ @NativeType("VkResult") public static int vkGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, @NativeType("uint32_t") int deviceRelativeId, @NativeType("VkDisplayKHR *") long[] pDisplay) { long __functionAddress = physicalDevice.getCapabilities().vkGetWinrtDisplayNV; if (CHECKS) { check(__functionAddress); check(pDisplay, 1); } return callPPI(physicalDevice.address(), deviceRelativeId, pDisplay, __functionAddress); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy