# vkCreateDisplayPlaneSurfaceKHR(3) Manual Page

## Name

vkCreateDisplayPlaneSurfaceKHR - Create a slink:VkSurfaceKHR structure representing a display plane and mode

Loading… please wait.

## C Specification

A complete display configuration includes a mode, one or more display planes and any parameters describing their behavior, and parameters describing some aspects of the images associated with those planes. Display surfaces describe the configuration of a single plane within a complete display configuration. To create a `VkSurfaceKHR` object for a display plane, call:

    // Provided by VK_KHR_display
    VkResult vkCreateDisplayPlaneSurfaceKHR(
        VkInstance                                  instance,
        const VkDisplaySurfaceCreateInfoKHR*        pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

## Parameters

- `instance` is the instance corresponding to the physical device the targeted display is on.

- `pCreateInfo` is a pointer to a VkDisplaySurfaceCreateInfoKHR structure specifying which mode, plane, and other parameters to use, as described below.

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

- `pSurface` is a pointer to a VkSurfaceKHR handle in which the created surface is returned.

## Description

Valid Usage (Implicit)

- VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter
  `instance` must be a valid VkInstance handle

- VUID-vkCreateDisplayPlaneSurfaceKHR-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkDisplaySurfaceCreateInfoKHR structure

- VUID-vkCreateDisplayPlaneSurfaceKHR-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateDisplayPlaneSurfaceKHR-pSurface-parameter
  `pSurface` must be a valid pointer to a VkSurfaceKHR handle

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_OUT_OF_DEVICE_MEMORY`

## See Also

VK_KHR_display, VkAllocationCallbacks, VkDisplaySurfaceCreateInfoKHR, VkInstance, VkSurfaceKHR

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0