API_Specification » APISpec_Window_System_Integration_WSI module

Chapter 32: Specification

Contents

Classes

struct VV::V0::Surface_PlatformAgnostic::Capabilities
Structure describing capabilities of a surface.
struct VV::V0::Surface_PlatformAgnostic::Format
Structure describing a supported swapchain format-color space pair.
template<>
struct VV::V0::Surface_Maker<EOS::Windows>::CreateInfo
Specification
struct VV::V1::Surface
Native platform surface or window objects are abstracted by surface objects.
struct VV::V1::Swapchain::CreateInfo
Specification
struct VV::V1::Swapchain::PresentationInfo
Specification
struct VV::V1::Swapchain
A queue of images that can be presented to a surface.

Enums

enum class EColorSpace: ui32 { SRGB_NonLinear = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, NonLinear_Display_P3 = VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT, ExtendedSRGB_Linear = VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT, Display_P3_LInear = VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT, DCI_P3_NonLinear = VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT, BT709_Linear = VK_COLOR_SPACE_BT709_LINEAR_EXT, BT709_NonLinear = VK_COLOR_SPACE_BT709_NONLINEAR_EXT, BT2020_Linear = VK_COLOR_SPACE_BT2020_LINEAR_EXT, Extensions_HDR_ST2084 = VK_COLOR_SPACE_HDR10_ST2084_EXT, Extension_DoblyVision = VK_COLOR_SPACE_DOLBYVISION_EXT, HDR10_HLG = VK_COLOR_SPACE_HDR10_HLG_EXT, AdobeRGB_Linear = VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT, AdobeRGB_NonLinear = VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT, Extension_PassThrough = VK_COLOR_SPACE_PASS_THROUGH_EXT, Extension_ExtendedSRGB_NonLinear = VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT, AMD_Native = VK_COLOR_SPACE_DISPLAY_NATIVE_AMD, KHR_SRGB_NonLinear = VK_COLORSPACE_SRGB_NONLINEAR_KHR, Extension_DCI_P3_Linear = VK_COLOR_SPACE_DCI_P3_LINEAR_EXT }
Specification
enum class ECompositeAlpha: ui32 { Opaque = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR, PreMultiplied = VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR, PostMultiplied = VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR, Inherit = VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR, VV_SpecifyBitmaskable = VK_COMPOSITE_ALPHA_FLAG_BITS_MAX_ENUM_KHR }
Specification
enum class EPresentationMode: ui32 { Immediate = VK_PRESENT_MODE_IMMEDIATE_KHR, Mailbox = VK_PRESENT_MODE_MAILBOX_KHR, FIFO = VK_PRESENT_MODE_FIFO_KHR, FIFO_Relaxed = VK_PRESENT_MODE_FIFO_RELAXED_KHR, SharedDemandRefresh = VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR, SharedContinuousRefresh = VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR }
Specification
enum class ESurfaceTransformFlag: ui32 { Identity = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, Rotate_90 = VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, Rotate_180 = VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, Rotate_270 = VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, Horizontal_Mirror = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR, Horizontal_Mirror_Rotate_90 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR, Horizontal_Mirror_Rotate_180 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR, Horizontal_Mirror_Rotate_270 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR, Inherit = VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR, VV_SpecifyBitmaskable = VK_SURFACE_TRANSFORM_FLAG_BITS_MAX_ENUM_KHR }
Specification
enum class ESwapchainCreateFlag: ui32 { SplitInstanceBindRegions = VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR, CreateProtected = VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR, CreateMutableFormat = VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR, VV_SpecifyBitmaskable = VK_SWAPCHAIN_CREATE_FLAG_BITS_MAX_ENUM_KHR }
Specification

Typedefs

using PresentationInfo = VkPresentInfoKHR
Used to specify parameters for a presentation.
using Handle = VkSurfaceKHR
Specification
using ETransformFlags = Bitfield<ESurfaceTransformFlag, VkSurfaceTransformFlagsKHR>
Specification
using CompositeAlphaFlags = Bitfield<ECompositeAlpha, VkCompositeAlphaFlagsKHR>
Specification
using Handle = VkSwapchainKHR
Specification
using CreateFlags = Bitfield<ESwapchainCreateFlag, VkSwapchainCreateFlagsKHR>
Specification

Functions

static auto QueuePresentation(LogicalDevice::Queue::Handle _queue, const PresentationInfo& _presentation) -> EResult
Queue an image for presentation.
static auto Create(V1::AppInstance::Handle _appHandle, const CreateInfo& _info, const Memory::AllocationCallbacks* _allocator, Handle& _surfaceHandle) -> EResult
Create a slink:VkSurfaceKHR object for an Win32 native window.
static void Destroy(AppInstance::Handle _appHandle, Surface::Handle _surfaceHandle, const Memory::AllocationCallbacks* _allocator)
Destroy a VkSurfaceKHR object.
static auto CheckPhysicalDeviceSupport(PhysicalDevice::Handle _physDeviceHandle, ui32 _queueFamilyIndex, Surface::Handle _surfaceHandle, Bool& _checkResult) -> EResult
Query if presentation is supported.
static auto GetPhysicalDeviceCapabilities(PhysicalDevice::Handle _deviceHandle, Surface::Handle _surface, Surface::Capabilities& _capabilitiesResult) -> EResult
Query surface capabilities.
static auto GetFormats(PhysicalDevice::Handle _deviceHandle, Surface::Handle _surfaceHandle, ui32& _numFormats, Surface::Format* _formatsContainer) -> EResult
Query color formats supported by surface.
static auto QuerySupportedPresentationModes(PhysicalDevice::Handle _deviceHandle, Surface::Handle _surfaceHandle, ui32& _numPresentationModes, EPresentationMode* _presentationModesContainer) -> EResult
Query supported presentation modes.
static auto AcquireNextImage(LogicalDevice::Handle _device, Handle _swapchain, u64 _timeout, Semaphore::Handle _semaphore, Fence::Handle _fence, ui32& _imageIndex) -> EResult
Acquire an available presentable image to use, and retrieve the index of that image.
static auto Create(LogicalDevice::Handle _deviceHandle, const CreateInfo& _info, const Memory::AllocationCallbacks* _allocator, Handle& _swapChain) -> EResult
Create a swapchain.
static void Destroy(LogicalDevice::Handle _deviceHandle, Handle _swapChainToDestroy, const Memory::AllocationCallbacks* _allocator)
Destroy a swapchain object.
static auto GetStatus(LogicalDevice::Handle _device, Handle _swapchain) -> EResult
Query a swapchains status when rendering to a shared presentable image.
static auto QueryImages(LogicalDevice::Handle _deviceHandle, Handle _swapChain, ui32& _numImages, Image::Handle* _imagesContainer) -> EResult
Obtain the array of presentable images associated with a swapchain.

Enum documentation

Typedef documentation

using PresentationInfo = VkPresentInfoKHR

Used to specify parameters for a presentation.

Specification

using Handle = VkSurfaceKHR

Specification

using ETransformFlags = Bitfield<ESurfaceTransformFlag, VkSurfaceTransformFlagsKHR>

Specification

using CompositeAlphaFlags = Bitfield<ECompositeAlpha, VkCompositeAlphaFlagsKHR>

Specification

using Handle = VkSwapchainKHR

Specification

using CreateFlags = Bitfield<ESwapchainCreateFlag, VkSwapchainCreateFlagsKHR>

Specification

Function documentation

static EResult QueuePresentation(LogicalDevice::Queue::Handle _queue, const PresentationInfo& _presentation)

Queue an image for presentation.

Parameters
_queue
_presentation

Specification

static EResult Create(V1::AppInstance::Handle _appHandle, const CreateInfo& _info, const Memory::AllocationCallbacks* _allocator, Handle& _surfaceHandle)

Create a slink:VkSurfaceKHR object for an Win32 native window.

Parameters
_appHandle
_info
_allocator
_surfaceHandle

Specification

static void Destroy(AppInstance::Handle _appHandle, Surface::Handle _surfaceHandle, const Memory::AllocationCallbacks* _allocator)

Destroy a VkSurfaceKHR object.

Parameters
_appHandle
_surfaceHandle
_allocator

Specification

static EResult CheckPhysicalDeviceSupport(PhysicalDevice::Handle _physDeviceHandle, ui32 _queueFamilyIndex, Surface::Handle _surfaceHandle, Bool& _checkResult)

Query if presentation is supported.

Parameters
_physDeviceHandle
_queueFamilyIndex
_surfaceHandle
_checkResult

Specification

static EResult GetPhysicalDeviceCapabilities(PhysicalDevice::Handle _deviceHandle, Surface::Handle _surface, Surface::Capabilities& _capabilitiesResult)

Query surface capabilities.

Parameters
_deviceHandle
_surface
_capabilitiesResult

Specification

static EResult GetFormats(PhysicalDevice::Handle _deviceHandle, Surface::Handle _surfaceHandle, ui32& _numFormats, Surface::Format* _formatsContainer)

Query color formats supported by surface.

Parameters
_deviceHandle
_surfaceHandle
_numFormats
_formatsContainer

If pSurfaceFormats is NULL, then the number of format pairs supported for the given surface is returned in pSurfaceFormatCount. Otherwise, pSurfaceFormatCount must point to a variable set by the user to the number of elements in the pSurfaceFormats array, and on return the variable is overwritten with the number of structures actually written to pSurfaceFormats.

Specification

static EResult QuerySupportedPresentationModes(PhysicalDevice::Handle _deviceHandle, Surface::Handle _surfaceHandle, ui32& _numPresentationModes, EPresentationMode* _presentationModesContainer)

Query supported presentation modes.

Parameters
_deviceHandle
_surfaceHandle
_numPresentationModes
_presentationModesContainer

If pPresentModes is NULL, then the number of presentation modes supported for the given surface is returned in pPresentModeCount. Otherwise, pPresentModeCount must point to a variable set by the user to the number of elements in the pPresentModes array, and on return the variable is overwritten with the number of values actually written to pPresentModes.

Specification

static EResult AcquireNextImage(LogicalDevice::Handle _device, Handle _swapchain, u64 _timeout, Semaphore::Handle _semaphore, Fence::Handle _fence, ui32& _imageIndex)

Acquire an available presentable image to use, and retrieve the index of that image.

Specification

static EResult Create(LogicalDevice::Handle _deviceHandle, const CreateInfo& _info, const Memory::AllocationCallbacks* _allocator, Handle& _swapChain)

Create a swapchain.

If the oldSwapchain parameter of pCreateInfo is a valid swapchain, which has exclusive full-screen access, that access is released from oldSwapchain. If the command succeeds in this case, the newly created swapchain will automatically acquire exclusive full-screen access from oldSwapchain. Specification

static void Destroy(LogicalDevice::Handle _deviceHandle, Handle _swapChainToDestroy, const Memory::AllocationCallbacks* _allocator)

Destroy a swapchain object.

The application must not destroy a swapchain until after completion of all outstanding operations on images that were acquired from the swapchain. swapchain and all associated VkImage handles are destroyed, and must not be acquired or used any more by the application. Specification

static EResult GetStatus(LogicalDevice::Handle _device, Handle _swapchain)

Query a swapchains status when rendering to a shared presentable image.

Specification

static EResult QueryImages(LogicalDevice::Handle _deviceHandle, Handle _swapChain, ui32& _numImages, Image::Handle* _imagesContainer)

Obtain the array of presentable images associated with a swapchain.

If pSwapchainImages is NULL, then the number of presentable images for swapchain is returned in pSwapchainImageCount. Otherwise, pSwapchainImageCount must point to a variable set by the user to the number of elements in the pSwapchainImages array, and on return the variable is overwritten with the number of structures actually written to pSwapchainImages.

Specification