Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class EXTHeadlessSurface

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

The VK_EXT_headless_surface extension is an instance extension. It provides a mechanism to create 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
VK_EXT_headless_surface
Extension Type
Instance extension
Registered Extension Number
257
Revision
1
Extension and Version Dependencies
VK_KHR_surface
Contact
Other Extension Metadata
Last Modified Date
2019-03-21
IP Status
No known IP claims.
Contributors
  • Ray Smith, Arm

Field Summary

Modifier and TypeField and Description
public static final String
public static final int
VK_EXT_HEADLESS_SURFACE_SPEC_VERSION

The extension specification version.

public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nvkCreateHeadlessSurfaceEXT(VkInstance instance, long pCreateInfo, long pAllocator, long pSurface)

Unsafe version of: CreateHeadlessSurfaceEXT

public static int
vkCreateHeadlessSurfaceEXT(VkInstance
the instance to associate the surface with.
instance
,
VkHeadlessSurfaceCreateInfoEXT
a pointer to a VkHeadlessSurfaceCreateInfoEXT structure containing parameters affecting the creation of the surface object.
pCreateInfo
,
VkAllocationCallbacks
the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).
pAllocator
,
LongBuffer
a pointer to a VkSurfaceKHR handle in which the created surface object is returned.
pSurface
)

Create a headless VkSurfaceKHR object.

public static int
vkCreateHeadlessSurfaceEXT(VkInstance instance, VkHeadlessSurfaceCreateInfoEXT pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSurface)

Array version of: CreateHeadlessSurfaceEXT

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_EXT_HEADLESS_SURFACE_EXTENSION_NAMEback to summary
public static final String VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME

The extension name.

VK_EXT_HEADLESS_SURFACE_SPEC_VERSIONback to summary
public static final int VK_EXT_HEADLESS_SURFACE_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXTback to summary
public static final int VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT

Extends VkStructureType.

Constructor Detail

EXTHeadlessSurfaceback to summary
protected EXTHeadlessSurface()

Method Detail

nvkCreateHeadlessSurfaceEXTback to summary
public static int nvkCreateHeadlessSurfaceEXT(VkInstance instance, long pCreateInfo, long pAllocator, long pSurface)

Unsafe version of: CreateHeadlessSurfaceEXT

vkCreateHeadlessSurfaceEXTback to summary
public static int vkCreateHeadlessSurfaceEXT(VkInstance instance, VkHeadlessSurfaceCreateInfoEXT pCreateInfo, VkAllocationCallbacks pAllocator, LongBuffer pSurface)

Create a headless VkSurfaceKHR object.

C Specification

To create a headless VkSurfaceKHR object, call:


VkResult vkCreateHeadlessSurfaceEXT(
    VkInstance                                  instance,
    const VkHeadlessSurfaceCreateInfoEXT*       pCreateInfo,
    const VkAllocationCallbacks*                pAllocator,
    VkSurfaceKHR*                               pSurface);
Valid Usage (Implicit)
  • instance must be a valid VkInstance handle
  • pCreateInfo must be a valid pointer to a valid VkHeadlessSurfaceCreateInfoEXT structure
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
  • pSurface must be a valid pointer to a VkSurfaceKHR handle
Return Codes
On success, this command returns
On failure, this command returns
See Also

VkAllocationCallbacks, VkHeadlessSurfaceCreateInfoEXT

Parameters
instance:VkInstance

the instance to associate the surface with.

pCreateInfo:VkHeadlessSurfaceCreateInfoEXT

a pointer to a VkHeadlessSurfaceCreateInfoEXT structure containing parameters affecting the creation of the surface object.

pAllocator:VkAllocationCallbacks

the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

pSurface:LongBuffer

a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

Annotations
@NativeType:VkResult
vkCreateHeadlessSurfaceEXTback to summary
public static int vkCreateHeadlessSurfaceEXT(VkInstance instance, VkHeadlessSurfaceCreateInfoEXT pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSurface)

Array version of: CreateHeadlessSurfaceEXT

Annotations
@NativeType:VkResult