C Specification

Additional modes may also be created by calling:

// Provided by VK_KHR_display
VkResult vkCreateDisplayModeKHR(
    VkPhysicalDevice                            physicalDevice,
    VkDisplayKHR                                display,
    const VkDisplayModeCreateInfoKHR*           pCreateInfo,
    const VkAllocationCallbacks*                pAllocator,
    VkDisplayModeKHR*                           pMode);

Parameters

  • physicalDevice is the physical device associated with display.

  • display is the display to create an additional mode for.

  • pCreateInfo is a pointer to a VkDisplayModeCreateInfoKHR structure describing the new mode to create.

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

  • pMode is a pointer to a VkDisplayModeKHR handle in which the mode created is returned.

Description

If VkPhysicalDeviceVulkanSC10Properties::deviceNoDynamicHostAllocations is VK_TRUE, vkCreateDisplayModeKHR must not return VK_ERROR_OUT_OF_HOST_MEMORY.

Valid Usage (Implicit)
  • VUID-vkCreateDisplayModeKHR-physicalDevice-parameter
    physicalDevice must be a valid VkPhysicalDevice handle

  • VUID-vkCreateDisplayModeKHR-display-parameter
    display must be a valid VkDisplayKHR handle

  • VUID-vkCreateDisplayModeKHR-pCreateInfo-parameter
    pCreateInfo must be a valid pointer to a valid VkDisplayModeCreateInfoKHR structure

  • VUID-vkCreateDisplayModeKHR-pAllocator-null
    pAllocator must be NULL

  • VUID-vkCreateDisplayModeKHR-pMode-parameter
    pMode must be a valid pointer to a VkDisplayModeKHR handle

  • VUID-vkCreateDisplayModeKHR-display-parent
    display must have been created, allocated, or retrieved from physicalDevice

Host Synchronization
  • Host access to display must be externally synchronized

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

  • VK_ERROR_INITIALIZATION_FAILED

See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0