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

org.lwjgl.vulkan.EXTHeadlessSurface 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 {@code VK_EXT_headless_surface} extension is an instance extension. It provides a mechanism to create {@code VkSurfaceKHR} objects independently of any window system or display device. The presentation operation for a swapchain created from a headless surface is by default a no-op, resulting in no externally-visible result.
 * 
 * 

Because there is no real presentation target, future extensions can layer on top of the headless surface to introduce arbitrary or customisable sets of restrictions or features. These could include features like saving to a file or restrictions to emulate a particular presentation target.

* *

This functionality is expected to be useful for application and driver development because it allows any platform to expose an arbitrary or customisable set of restrictions and features of a presentation engine. This makes it a useful portable test target for applications targeting a wide range of presentation engines where the actual target presentation engines might be scarce, unavailable or otherwise undesirable or inconvenient to use for general Vulkan application development.

* *
VK_EXT_headless_surface
* *
*
Name String
*
{@code VK_EXT_headless_surface}
*
Extension Type
*
Instance extension
*
Registered Extension Number
*
257
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link KHRSurface VK_KHR_surface}
  • *
*
Contact
*
*
* *
Other Extension Metadata
* *
*
Last Modified Date
*
2019-03-21
*
IP Status
*
No known IP claims.
*
Contributors
*
    *
  • Ray Smith, Arm
  • *
*
*/ public class EXTHeadlessSurface { /** The extension specification version. */ public static final int VK_EXT_HEADLESS_SURFACE_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME = "VK_EXT_headless_surface"; /** Extends {@code VkStructureType}. */ public static final int VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000; protected EXTHeadlessSurface() { throw new UnsupportedOperationException(); } // --- [ vkCreateHeadlessSurfaceEXT ] --- /** Unsafe version of: {@link #vkCreateHeadlessSurfaceEXT CreateHeadlessSurfaceEXT} */ public static int nvkCreateHeadlessSurfaceEXT(VkInstance instance, long pCreateInfo, long pAllocator, long pSurface) { long __functionAddress = instance.getCapabilities().vkCreateHeadlessSurfaceEXT; if (CHECKS) { check(__functionAddress); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(instance.address(), pCreateInfo, pAllocator, pSurface, __functionAddress); } /** * Create a headless {@code VkSurfaceKHR} object. * *
C Specification
* *

To create a headless {@code VkSurfaceKHR} object, call:

* *

     * VkResult vkCreateHeadlessSurfaceEXT(
     *     VkInstance                                  instance,
     *     const VkHeadlessSurfaceCreateInfoEXT*       pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkSurfaceKHR*                               pSurface);
* *
Valid Usage (Implicit)
* *
    *
  • {@code instance} must be a valid {@code VkInstance} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkHeadlessSurfaceCreateInfoEXT} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pSurface} must be a valid pointer to a {@code VkSurfaceKHR} 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_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkHeadlessSurfaceCreateInfoEXT}

* * @param instance the instance to associate the surface with. * @param pCreateInfo a pointer to a {@link VkHeadlessSurfaceCreateInfoEXT} structure containing parameters affecting the creation of the surface object. * @param pAllocator the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation). * @param pSurface a pointer to a {@code VkSurfaceKHR} handle in which the created surface object is returned. */ @NativeType("VkResult") public static int vkCreateHeadlessSurfaceEXT(VkInstance instance, @NativeType("VkHeadlessSurfaceCreateInfoEXT const *") VkHeadlessSurfaceCreateInfoEXT pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSurfaceKHR *") LongBuffer pSurface) { if (CHECKS) { check(pSurface, 1); } return nvkCreateHeadlessSurfaceEXT(instance, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pSurface)); } /** Array version of: {@link #vkCreateHeadlessSurfaceEXT CreateHeadlessSurfaceEXT} */ @NativeType("VkResult") public static int vkCreateHeadlessSurfaceEXT(VkInstance instance, @NativeType("VkHeadlessSurfaceCreateInfoEXT const *") VkHeadlessSurfaceCreateInfoEXT pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSurfaceKHR *") long[] pSurface) { long __functionAddress = instance.getCapabilities().vkCreateHeadlessSurfaceEXT; if (CHECKS) { check(__functionAddress); check(pSurface, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(instance.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pSurface, __functionAddress); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy