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

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

/**
 * The {@code VK_KHR_surface} extension is an instance extension. It introduces {@code VkSurfaceKHR} objects, which abstract native platform surface or window objects for use with Vulkan. It also provides a way to determine whether a queue family in a physical device supports presenting to particular surface.
 * 
 * 

Separate extensions for each each platform provide the mechanisms for creating {@code VkSurfaceKHR} objects, but once created they may be used in this and other platform-independent extensions, in particular the {@code VK_KHR_swapchain} extension.

* *
Examples
* *
Note
* *

The example code for the {@code VK_KHR_surface} and {@code VK_KHR_swapchain} extensions was removed from the appendix after revision 1.0.29. This WSI example code was ported to the cube demo that is shipped with the official Khronos SDK, and is being kept up-to-date in that location (see: https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/demos/cube.c).

*
* *
*
Name String
*
{@code VK_KHR_surface}
*
Extension Type
*
Instance extension
*
Registered Extension Number
*
1
*
Revision
*
25
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
*
Contact
*
*
Last Modified Date
*
2016-08-25
*
IP Status
*
No known IP claims.
*
Contributors
*
    *
  • Patrick Doane, Blizzard
  • *
  • Ian Elliott, LunarG
  • *
  • Jesse Hall, Google
  • *
  • James Jones, NVIDIA
  • *
  • David Mao, AMD
  • *
  • Norbert Nopper, Freescale
  • *
  • Alon Or-bach, Samsung
  • *
  • Daniel Rakos, AMD
  • *
  • Graham Sellers, AMD
  • *
  • Jeff Vigil, Qualcomm
  • *
  • Chia-I Wu, LunarG
  • *
  • Jason Ekstrand, Intel
  • *
*
*/ public class KHRSurface { /** The extension specification version. */ public static final int VK_KHR_SURFACE_SPEC_VERSION = 25; /** The extension name. */ public static final String VK_KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"; /** * Extends {@code VkResult}. * *
Enum values:
* *
    *
  • {@link #VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
  • *
  • {@link #VK_ERROR_NATIVE_WINDOW_IN_USE_KHR ERROR_NATIVE_WINDOW_IN_USE_KHR}
  • *
*/ public static final int VK_ERROR_SURFACE_LOST_KHR = -1000000000, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001; /** Extends {@code VkObjectType}. */ public static final int VK_OBJECT_TYPE_SURFACE_KHR = 1000000000; /** * VkSurfaceTransformFlagBitsKHR - presentation transforms supported on a device * *
Description
* *
    *
  • {@link #VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR SURFACE_TRANSFORM_IDENTITY_BIT_KHR} indicates that image content is presented without being transformed.
  • *
  • {@link #VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR SURFACE_TRANSFORM_ROTATE_90_BIT_KHR} indicates that image content is rotated 90 degrees clockwise.
  • *
  • {@link #VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR SURFACE_TRANSFORM_ROTATE_180_BIT_KHR} indicates that image content is rotated 180 degrees clockwise.
  • *
  • {@link #VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR SURFACE_TRANSFORM_ROTATE_270_BIT_KHR} indicates that image content is rotated 270 degrees clockwise.
  • *
  • {@link #VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR} indicates that image content is mirrored horizontally.
  • *
  • {@link #VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR} indicates that image content is mirrored horizontally, then rotated 90 degrees clockwise.
  • *
  • {@link #VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR} indicates that image content is mirrored horizontally, then rotated 180 degrees clockwise.
  • *
  • {@link #VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR} indicates that image content is mirrored horizontally, then rotated 270 degrees clockwise.
  • *
  • {@link #VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR SURFACE_TRANSFORM_INHERIT_BIT_KHR} indicates that the presentation transform is not specified, and is instead determined by platform-specific considerations and mechanisms outside Vulkan.
  • *
* *
See Also
* *

{@link VkDisplaySurfaceCreateInfoKHR}, {@link VkSurfaceCapabilities2EXT}, {@link VkSurfaceCapabilitiesKHR}, {@code VkSurfaceTransformFlagsKHR}, {@link VkSwapchainCreateInfoKHR}

*/ public static final int VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x1, VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x2, VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x4, VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x8, VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x10, VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x20, VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x40, VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x80, VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x100; /** * VkCompositeAlphaFlagBitsKHR - alpha compositing modes supported on a device * *
Description
* *

These values are described as follows:

* *
    *
  • {@link #VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR COMPOSITE_ALPHA_OPAQUE_BIT_KHR}: The alpha channel, if it exists, of the images is ignored in the compositing process. Instead, the image is treated as if it has a constant alpha of 1.0.
  • *
  • {@link #VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR}: The alpha channel, if it exists, of the images is respected in the compositing process. The non-alpha channels of the image are expected to already be multiplied by the alpha channel by the application.
  • *
  • {@link #VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR}: The alpha channel, if it exists, of the images is respected in the compositing process. The non-alpha channels of the image are not expected to already be multiplied by the alpha channel by the application; instead, the compositor will multiply the non-alpha channels of the image by the alpha channel during compositing.
  • *
  • {@link #VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR COMPOSITE_ALPHA_INHERIT_BIT_KHR}: The way in which the presentation engine treats the alpha channel in the images is unknown to the Vulkan API. Instead, the application is responsible for setting the composite alpha blending mode using native window system commands. If the application does not set the blending mode using native window system commands, then a platform-specific default will be used.
  • *
* *
See Also
* *

{@code VkCompositeAlphaFlagsKHR}, {@link VkSwapchainCreateInfoKHR}

*/ public static final int VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x1, VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x2, VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x4, VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x8; /** * VkColorSpaceKHR - supported color space of the presentation engine * *
Description
* *
    *
  • {@link #VK_COLOR_SPACE_SRGB_NONLINEAR_KHR COLOR_SPACE_SRGB_NONLINEAR_KHR} indicates support for the sRGB color space.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT} indicates support for the Display-P3 color space and applies an sRGB-like transfer function (defined below).
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT} indicates support for the extended sRGB color space and applies a linear transfer function.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT} indicates support for the extended sRGB color space and applies an sRGB transfer function.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_DCI_P3_LINEAR_EXT COLOR_SPACE_DCI_P3_LINEAR_EXT} indicates support for the DCI-P3 color space and applies a linear OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT COLOR_SPACE_DCI_P3_NONLINEAR_EXT} indicates support for the DCI-P3 color space and applies the Gamma 2.6 OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_BT709_LINEAR_EXT COLOR_SPACE_BT709_LINEAR_EXT} indicates support for the BT709 color space and applies a linear OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_BT709_NONLINEAR_EXT COLOR_SPACE_BT709_NONLINEAR_EXT} indicates support for the BT709 color space and applies the SMPTE 170M OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_BT2020_LINEAR_EXT COLOR_SPACE_BT2020_LINEAR_EXT} indicates support for the BT2020 color space and applies a linear OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_HDR10_ST2084_EXT COLOR_SPACE_HDR10_ST2084_EXT} indicates support for the HDR10 (BT2020 color) space and applies the SMPTE ST2084 Perceptual Quantizer (PQ) OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_DOLBYVISION_EXT COLOR_SPACE_DOLBYVISION_EXT} indicates support for the Dolby Vision (BT2020 color space), proprietary encoding, and applies the SMPTE ST2084 OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_HDR10_HLG_EXT COLOR_SPACE_HDR10_HLG_EXT} indicates support for the HDR10 (BT2020 color space) and applies the Hybrid Log Gamma (HLG) OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT COLOR_SPACE_ADOBERGB_LINEAR_EXT} indicates support for the AdobeRGB color space and applies a linear OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT COLOR_SPACE_ADOBERGB_NONLINEAR_EXT} indicates support for the AdobeRGB color space and applies the Gamma 2.2 OETF.
  • *
  • {@link EXTSwapchainColorspace#VK_COLOR_SPACE_PASS_THROUGH_EXT COLOR_SPACE_PASS_THROUGH_EXT} indicates that color components are used “as is”. This is intended to allow applications to supply data for color spaces not described here.
  • *
* *

The color components of Non-linear color space swap chain images have had the appropriate transfer function applied. Vulkan requires that all implementations support the sRGB transfer function when using an SRGB pixel format. Other transfer functions, such as SMPTE 170M or SMPTE2084, must not be performed by the implementation, but can be performed by the application shader. This extension defines enums for {@code VkColorSpaceKHR} that correspond to the following color spaces::

* *
Color Spaces and Attributes
* * * * * * * * * * * * * * *
NameRed PrimaryGreen PrimaryBlue PrimaryWhite-pointTransfer function
DCI-P30.680, 0.3200.265, 0.6900.150, 0.0600.3127, 0.3290 (D65)Gamma 2.6
Display-P30.680, 0.3200.265, 0.6900.150, 0.0600.3127, 0.3290 (D65)Display-P3
BT7090.640, 0.3300.300, 0.6000.150, 0.0600.3127, 0.3290 (D65)SMPTE 170M
sRGB0.640, 0.3300.300, 0.6000.150, 0.0600.3127, 0.3290 (D65)sRGB
extended sRGB0.640, 0.3300.300, 0.6000.150, 0.0600.3127, 0.3290 (D65)extended sRGB
HDR10_ST20840.708, 0.2920.170, 0.7970.131, 0.0460.3127, 0.3290 (D65)ST2084
DOLBYVISION0.708, 0.2920.170, 0.7970.131, 0.0460.3127, 0.3290 (D65)ST2084
HDR10_HLG0.708, 0.2920.170, 0.7970.131, 0.0460.3127, 0.3290 (D65)HLG
AdobeRGB0.640, 0.3300.210, 0.7100.150, 0.0600.3127, 0.3290 (D65)AdobeRGB
* *

For Opto-Electrical Transfer Function (OETF), unless otherwise specified, the values of L and E are defined as:

* *

L - linear luminance of image 0 &le L ≤ 1 for conventional colorimetry

* *

E - corresponding electrical signal (value stored in memory)

* *
See Also
* *

{@link VkSurfaceFormatKHR}, {@link VkSwapchainCreateInfoKHR}

*/ public static final int VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0; /** * VkPresentModeKHR - presentation mode supported for a surface * *
Description
* *
    *
  • {@link #VK_PRESENT_MODE_IMMEDIATE_KHR PRESENT_MODE_IMMEDIATE_KHR} indicates that the presentation engine does not wait for a vertical blanking period to update the current image, meaning this mode may result in visible tearing. No internal queuing of presentation requests is needed, as the requests are applied immediately.
  • *
  • {@link #VK_PRESENT_MODE_MAILBOX_KHR PRESENT_MODE_MAILBOX_KHR} indicates that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal single-entry queue is used to hold pending presentation requests. If the queue is full when a new presentation request is received, the new request replaces the existing entry, and any images associated with the prior entry become available for re-use by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty.
  • *
  • {@link #VK_PRESENT_MODE_FIFO_KHR PRESENT_MODE_FIFO_KHR} indicates that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during each vertical blanking period in which the queue is non-empty. This is the only value of {@code presentMode} that is required: to be supported.
  • *
  • {@link #VK_PRESENT_MODE_FIFO_RELAXED_KHR PRESENT_MODE_FIFO_RELAXED_KHR} indicates that the presentation engine generally waits for the next vertical blanking period to update the current image. If a vertical blanking period has already passed since the last update of the current image then the presentation engine does not wait for another vertical blanking period for the update, meaning this mode may result in visible tearing in this case. This mode is useful for reducing visual stutter with an application that will mostly present a new image before the next vertical blanking period, but may occasionally be late, and present a new image just after the next vertical blanking period. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during or after each vertical blanking period in which the queue is non-empty.
  • *
  • {@link KHRSharedPresentableImage#VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR} indicates that the presentation engine and application have concurrent access to a single image, which is referred to as a shared presentable image. The presentation engine is only required to update the current image after a new presentation request is received. Therefore the application must make a presentation request whenever an update is required. However, the presentation engine may update the current image at any point, meaning this mode may result in visible tearing.
  • *
  • {@link KHRSharedPresentableImage#VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR} indicates that the presentation engine and application have concurrent access to a single image, which is referred to as a shared presentable image. The presentation engine periodically updates the current image on its regular refresh cycle. The application is only required to make one initial presentation request, after which the presentation engine must update the current image without any need for further presentation requests. The application can indicate the image contents have been updated by making a presentation request, but this does not guarantee the timing of when it will be updated. This mode may result in visible tearing if rendering to the image is not timed correctly.
  • *
* *

The supported {@code VkImageUsageFlagBits} of the presentable images of a swapchain created for a surface may differ depending on the presentation mode, and can be determined as per the table below:

* *
Presentable image usage queries
* * * * * * * * * * * *
Presentation modeImage usage flags
{@link #VK_PRESENT_MODE_IMMEDIATE_KHR PRESENT_MODE_IMMEDIATE_KHR}{@link VkSurfaceCapabilitiesKHR}{@code ::supportedUsageFlags}
{@link #VK_PRESENT_MODE_MAILBOX_KHR PRESENT_MODE_MAILBOX_KHR}{@link VkSurfaceCapabilitiesKHR}{@code ::supportedUsageFlags}
{@link #VK_PRESENT_MODE_FIFO_KHR PRESENT_MODE_FIFO_KHR}{@link VkSurfaceCapabilitiesKHR}{@code ::supportedUsageFlags}
{@link #VK_PRESENT_MODE_FIFO_RELAXED_KHR PRESENT_MODE_FIFO_RELAXED_KHR}{@link VkSurfaceCapabilitiesKHR}{@code ::supportedUsageFlags}
{@link KHRSharedPresentableImage#VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR}{@link VkSharedPresentSurfaceCapabilitiesKHR}{@code ::sharedPresentSupportedUsageFlags}
{@link KHRSharedPresentableImage#VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR}{@link VkSharedPresentSurfaceCapabilitiesKHR}{@code ::sharedPresentSupportedUsageFlags}
* *
Note
* *

For reference, the mode indicated by {@link #VK_PRESENT_MODE_FIFO_KHR PRESENT_MODE_FIFO_KHR} is equivalent to the behavior of {wgl|glX|egl}SwapBuffers with a swap interval of 1, while the mode indicated by {@link #VK_PRESENT_MODE_FIFO_RELAXED_KHR PRESENT_MODE_FIFO_RELAXED_KHR} is equivalent to the behavior of {wgl|glX}SwapBuffers with a swap interval of -1 (from the {WGL|GLX}_EXT_swap_control_tear extensions).

*
* *
See Also
* *

{@link VkSwapchainCreateInfoKHR}, {@link #vkGetPhysicalDeviceSurfacePresentModesKHR GetPhysicalDeviceSurfacePresentModesKHR}

*/ public static final int VK_PRESENT_MODE_IMMEDIATE_KHR = 0, VK_PRESENT_MODE_MAILBOX_KHR = 1, VK_PRESENT_MODE_FIFO_KHR = 2, VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3; protected KHRSurface() { throw new UnsupportedOperationException(); } static boolean isAvailable(VKCapabilitiesInstance caps) { return checkFunctions( caps.vkDestroySurfaceKHR, caps.vkGetPhysicalDeviceSurfaceSupportKHR, caps.vkGetPhysicalDeviceSurfaceCapabilitiesKHR, caps.vkGetPhysicalDeviceSurfaceFormatsKHR, caps.vkGetPhysicalDeviceSurfacePresentModesKHR ); } // --- [ vkDestroySurfaceKHR ] --- /** Unsafe version of: {@link #vkDestroySurfaceKHR DestroySurfaceKHR} */ public static void nvkDestroySurfaceKHR(VkInstance instance, long surface, long pAllocator) { long __functionAddress = instance.getCapabilities().vkDestroySurfaceKHR; if (CHECKS) { check(__functionAddress); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(__functionAddress, instance.address(), surface, pAllocator); } /** * Destroy a VkSurfaceKHR object. * *
C Specification
* *

To destroy a {@code VkSurfaceKHR} object, call:

* *
     * void vkDestroySurfaceKHR(
     *     VkInstance                                  instance,
     *     VkSurfaceKHR                                surface,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Description
* *

Destroying a {@code VkSurfaceKHR} merely severs the connection between Vulkan and the native surface, and does not imply destroying the native surface, closing a window, or similar behavior.

* *
Valid Usage
* *
    *
  • All {@code VkSwapchainKHR} objects created for {@code surface} must have been destroyed prior to destroying {@code surface}
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code surface} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code surface} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code instance} must be a valid {@code VkInstance} handle
  • *
  • If {@code surface} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code surface} must be a valid {@code VkSurfaceKHR} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code surface} is a valid handle, it must have been created, allocated, or retrieved from {@code instance}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code surface} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param instance the instance used to create the surface. * @param surface the surface to destroy. * @param pAllocator the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation). */ public static void vkDestroySurfaceKHR(VkInstance instance, @NativeType("VkSurfaceKHR") long surface, @NativeType("const VkAllocationCallbacks *") VkAllocationCallbacks pAllocator) { nvkDestroySurfaceKHR(instance, surface, memAddressSafe(pAllocator)); } // --- [ vkGetPhysicalDeviceSurfaceSupportKHR ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR} */ public static int nvkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, int queueFamilyIndex, long surface, long pSupported) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfaceSupportKHR; if (CHECKS) { check(__functionAddress); } return callPJPI(__functionAddress, physicalDevice.address(), queueFamilyIndex, surface, pSupported); } /** * Query if presentation is supported. * *
C Specification
* *

To determine whether a queue family of a physical device supports presentation to a given surface, call:

* *
     * VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
     *     VkPhysicalDevice                            physicalDevice,
     *     uint32_t                                    queueFamilyIndex,
     *     VkSurfaceKHR                                surface,
     *     VkBool32*                                   pSupported);
* *
Valid Usage
* *
    *
  • {@code queueFamilyIndex} must be less than {@code pQueueFamilyPropertyCount} returned by {@link VK10#vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties} for the given {@code physicalDevice}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code surface} must be a valid {@code VkSurfaceKHR} handle
  • *
  • {@code pSupported} must be a pointer to a {@code VkBool32} value
  • *
  • Both of {@code physicalDevice}, and {@code surface} must have been created, allocated, or retrieved from the same {@code VkInstance}
  • *
* *
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 #VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
  • *
*
* * @param physicalDevice the physical device. * @param queueFamilyIndex the queue family. * @param surface the surface. * @param pSupported a pointer to a {@code VkBool32}, which is set to {@link VK10#VK_TRUE TRUE} to indicate support, and {@link VK10#VK_FALSE FALSE} otherwise. */ @NativeType("VkResult") public static int vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, @NativeType("uint32_t") int queueFamilyIndex, @NativeType("VkSurfaceKHR") long surface, @NativeType("VkBool32 *") IntBuffer pSupported) { if (CHECKS) { check(pSupported, 1); } return nvkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, memAddress(pSupported)); } // --- [ vkGetPhysicalDeviceSurfaceCapabilitiesKHR ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR} */ public static int nvkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, long surface, long pSurfaceCapabilities) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfaceCapabilitiesKHR; if (CHECKS) { check(__functionAddress); } return callPJPI(__functionAddress, physicalDevice.address(), surface, pSurfaceCapabilities); } /** * Query surface capabilities. * *
C Specification
* *

To query the basic capabilities of a surface, needed in order to create a swapchain, call:

* *
     * VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkSurfaceKHR                                surface,
     *     VkSurfaceCapabilitiesKHR*                   pSurfaceCapabilities);
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code surface} must be a valid {@code VkSurfaceKHR} handle
  • *
  • {@code pSurfaceCapabilities} must be a pointer to a {@link VkSurfaceCapabilitiesKHR} structure
  • *
  • Both of {@code physicalDevice}, and {@code surface} must have been created, allocated, or retrieved from the same {@code VkInstance}
  • *
* *
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 #VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
  • *
*
* *
See Also
* *

{@link VkSurfaceCapabilitiesKHR}

* * @param physicalDevice the physical device that will be associated with the swapchain to be created, as described for {@link KHRSwapchain#vkCreateSwapchainKHR CreateSwapchainKHR}. * @param surface the surface that will be associated with the swapchain. * @param pSurfaceCapabilities a pointer to an instance of the {@link VkSurfaceCapabilitiesKHR} structure in which the capabilities are returned. */ @NativeType("VkResult") public static int vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, @NativeType("VkSurfaceKHR") long surface, @NativeType("VkSurfaceCapabilitiesKHR *") VkSurfaceCapabilitiesKHR pSurfaceCapabilities) { return nvkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities.address()); } // --- [ vkGetPhysicalDeviceSurfaceFormatsKHR ] --- /** * Unsafe version of: {@link #vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR} * * @param pSurfaceFormatCount a pointer to an integer related to the number of format pairs available or queried, as described below. */ public static int nvkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, long surface, long pSurfaceFormatCount, long pSurfaceFormats) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfaceFormatsKHR; if (CHECKS) { check(__functionAddress); } return callPJPPI(__functionAddress, physicalDevice.address(), surface, pSurfaceFormatCount, pSurfaceFormats); } /** * Query color formats supported by surface. * *
C Specification
* *

To query the supported swapchain format-color space pairs for a surface, call:

* *
     * VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkSurfaceKHR                                surface,
     *     uint32_t*                                   pSurfaceFormatCount,
     *     VkSurfaceFormatKHR*                         pSurfaceFormats);
* *
Description
* *

If {@code pSurfaceFormats} is {@code NULL}, then the number of format pairs supported for the given {@code surface} is returned in {@code pSurfaceFormatCount}. The number of format pairs supported will be greater than or equal to 1. Otherwise, {@code pSurfaceFormatCount} must point to a variable set by the user to the number of elements in the {@code pSurfaceFormats} array, and on return the variable is overwritten with the number of structures actually written to {@code pSurfaceFormats}. If the value of {@code pSurfaceFormatCount} is less than the number of format pairs supported, at most {@code pSurfaceFormatCount} structures will be written. If {@code pSurfaceFormatCount} is smaller than the number of format pairs supported for the given {@code surface}, {@link VK10#VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link VK10#VK_SUCCESS SUCCESS} to indicate that not all the available values were returned.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code surface} must be a valid {@code VkSurfaceKHR} handle
  • *
  • {@code pSurfaceFormatCount} must be a pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pSurfaceFormatCount} is not 0, and {@code pSurfaceFormats} is not {@code NULL}, {@code pSurfaceFormats} must be a pointer to an array of {@code pSurfaceFormatCount} {@link VkSurfaceFormatKHR} structures
  • *
  • Both of {@code physicalDevice}, and {@code surface} must have been created, allocated, or retrieved from the same {@code VkInstance}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link VK10#VK_SUCCESS SUCCESS}
  • *
  • {@link VK10#VK_INCOMPLETE INCOMPLETE}
  • *
*
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 #VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
  • *
*
* *
See Also
* *

{@link VkSurfaceFormatKHR}

* * @param physicalDevice the physical device that will be associated with the swapchain to be created, as described for {@link KHRSwapchain#vkCreateSwapchainKHR CreateSwapchainKHR}. * @param surface the surface that will be associated with the swapchain. * @param pSurfaceFormatCount a pointer to an integer related to the number of format pairs available or queried, as described below. * @param pSurfaceFormats either {@code NULL} or a pointer to an array of {@link VkSurfaceFormatKHR} structures. */ @NativeType("VkResult") public static int vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, @NativeType("VkSurfaceKHR") long surface, @NativeType("uint32_t *") IntBuffer pSurfaceFormatCount, @NativeType("VkSurfaceFormatKHR *") VkSurfaceFormatKHR.Buffer pSurfaceFormats) { if (CHECKS) { check(pSurfaceFormatCount, 1); checkSafe(pSurfaceFormats, pSurfaceFormatCount.get(pSurfaceFormatCount.position())); } return nvkGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, memAddress(pSurfaceFormatCount), memAddressSafe(pSurfaceFormats)); } // --- [ vkGetPhysicalDeviceSurfacePresentModesKHR ] --- /** * Unsafe version of: {@link #vkGetPhysicalDeviceSurfacePresentModesKHR GetPhysicalDeviceSurfacePresentModesKHR} * * @param pPresentModeCount a pointer to an integer related to the number of presentation modes available or queried, as described below. */ public static int nvkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, long surface, long pPresentModeCount, long pPresentModes) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfacePresentModesKHR; if (CHECKS) { check(__functionAddress); } return callPJPPI(__functionAddress, physicalDevice.address(), surface, pPresentModeCount, pPresentModes); } /** * Query supported presentation modes. * *
C Specification
* *

To query the supported presentation modes for a surface, call:

* *
     * VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkSurfaceKHR                                surface,
     *     uint32_t*                                   pPresentModeCount,
     *     VkPresentModeKHR*                           pPresentModes);
* *
Description
* *

If {@code pPresentModes} is {@code NULL}, then the number of presentation modes supported for the given {@code surface} is returned in {@code pPresentModeCount}. Otherwise, {@code pPresentModeCount} must point to a variable set by the user to the number of elements in the {@code pPresentModes} array, and on return the variable is overwritten with the number of values actually written to {@code pPresentModes}. If the value of {@code pPresentModeCount} is less than the number of presentation modes supported, at most {@code pPresentModeCount} values will be written. If {@code pPresentModeCount} is smaller than the number of presentation modes supported for the given {@code surface}, {@link VK10#VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link VK10#VK_SUCCESS SUCCESS} to indicate that not all the available values were returned.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code surface} must be a valid {@code VkSurfaceKHR} handle
  • *
  • {@code pPresentModeCount} must be a pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPresentModeCount} is not 0, and {@code pPresentModes} is not {@code NULL}, {@code pPresentModes} must be a pointer to an array of {@code pPresentModeCount} {@code VkPresentModeKHR} values
  • *
  • Both of {@code physicalDevice}, and {@code surface} must have been created, allocated, or retrieved from the same {@code VkInstance}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link VK10#VK_SUCCESS SUCCESS}
  • *
  • {@link VK10#VK_INCOMPLETE INCOMPLETE}
  • *
*
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 #VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
  • *
*
* * @param physicalDevice the physical device that will be associated with the swapchain to be created, as described for {@link KHRSwapchain#vkCreateSwapchainKHR CreateSwapchainKHR}. * @param surface the surface that will be associated with the swapchain. * @param pPresentModeCount a pointer to an integer related to the number of presentation modes available or queried, as described below. * @param pPresentModes either {@code NULL} or a pointer to an array of {@code VkPresentModeKHR} values, indicating the supported presentation modes. */ @NativeType("VkResult") public static int vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, @NativeType("VkSurfaceKHR") long surface, @NativeType("uint32_t *") IntBuffer pPresentModeCount, @NativeType("VkPresentModeKHR *") IntBuffer pPresentModes) { if (CHECKS) { check(pPresentModeCount, 1); checkSafe(pPresentModes, pPresentModeCount.get(pPresentModeCount.position())); } return nvkGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, memAddress(pPresentModeCount), memAddressSafe(pPresentModes)); } /** Array version of: {@link #vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR} */ @NativeType("VkResult") public static int vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, @NativeType("uint32_t") int queueFamilyIndex, @NativeType("VkSurfaceKHR") long surface, @NativeType("VkBool32 *") int[] pSupported) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfaceSupportKHR; if (CHECKS) { check(__functionAddress); check(pSupported, 1); } return callPJPI(__functionAddress, physicalDevice.address(), queueFamilyIndex, surface, pSupported); } /** Array version of: {@link #vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR} */ @NativeType("VkResult") public static int vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, @NativeType("VkSurfaceKHR") long surface, @NativeType("uint32_t *") int[] pSurfaceFormatCount, @NativeType("VkSurfaceFormatKHR *") VkSurfaceFormatKHR.Buffer pSurfaceFormats) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfaceFormatsKHR; if (CHECKS) { check(__functionAddress); check(pSurfaceFormatCount, 1); checkSafe(pSurfaceFormats, pSurfaceFormatCount[0]); } return callPJPPI(__functionAddress, physicalDevice.address(), surface, pSurfaceFormatCount, memAddressSafe(pSurfaceFormats)); } /** Array version of: {@link #vkGetPhysicalDeviceSurfacePresentModesKHR GetPhysicalDeviceSurfacePresentModesKHR} */ @NativeType("VkResult") public static int vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, @NativeType("VkSurfaceKHR") long surface, @NativeType("uint32_t *") int[] pPresentModeCount, @NativeType("VkPresentModeKHR *") int[] pPresentModes) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfacePresentModesKHR; if (CHECKS) { check(__functionAddress); check(pPresentModeCount, 1); checkSafe(pPresentModes, pPresentModeCount[0]); } return callPJPPI(__functionAddress, physicalDevice.address(), surface, pPresentModeCount, pPresentModes); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy