# vkGetPhysicalDeviceSurfaceSupportKHR(3) Manual Page

## Name

vkGetPhysicalDeviceSurfaceSupportKHR - Query if presentation is supported

Loading… please wait.

## C Specification

To determine whether a queue family of a physical device supports presentation to a given surface, call:

    // Provided by VK_KHR_surface
    VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
        VkPhysicalDevice                            physicalDevice,
        uint32_t                                    queueFamilyIndex,
        VkSurfaceKHR                                surface,
        VkBool32*                                   pSupported);

## Parameters

- `physicalDevice` is the physical device.

- `queueFamilyIndex` is the queue family.

- `surface` is the surface.

- `pSupported` is a pointer to a VkBool32. `VK_TRUE` indicates support, and `VK_FALSE` indicates no support.

## Description

Valid Usage

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-queueFamilyIndex-01269
  `queueFamilyIndex` must be less than `pQueueFamilyPropertyCount` returned by `vkGetPhysicalDeviceQueueFamilyProperties` for the given `physicalDevice`

Valid Usage (Implicit)

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter
  `surface` must be a valid VkSurfaceKHR handle

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-pSupported-parameter
  `pSupported` must be a valid pointer to a VkBool32 value

- VUID-vkGetPhysicalDeviceSurfaceSupportKHR-commonparent
  Both of `physicalDevice`, and `surface` must have been created, allocated, or retrieved from the same VkInstance

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_SURFACE_LOST_KHR`

## See Also

VK_KHR_surface, VkBool32, VkPhysicalDevice, 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-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0