VkInstanceCreateInfo(3)

# VkInstanceCreateInfo(3) Manual Page

## Name

VkInstanceCreateInfo - Structure specifying parameters of a newly created instance

Loading… please wait.

## C Specification

The `VkInstanceCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkInstanceCreateInfo {
        VkStructureType             sType;
        const void*                 pNext;
        VkInstanceCreateFlags       flags;
        const VkApplicationInfo*    pApplicationInfo;
        uint32_t                    enabledLayerCount;
        const char* const*          ppEnabledLayerNames;
        uint32_t                    enabledExtensionCount;
        const char* const*          ppEnabledExtensionNames;
    } VkInstanceCreateInfo;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is a bitmask of VkInstanceCreateFlagBits indicating the behavior of the instance.

- `pApplicationInfo` is `NULL` or a pointer to a `VkApplicationInfo` structure. If not `NULL`, this information helps implementations recognize behavior inherent to classes of applications. VkApplicationInfo is defined in detail below.

- `enabledLayerCount` is the number of global layers to enable.

- `ppEnabledLayerNames` is a pointer to an array of `enabledLayerCount` null-terminated UTF-8 strings containing the names of layers to enable for the created instance. The layers are loaded in the order they are listed in this array, with the first array element being the closest to the application, and the last array element being the closest to the driver. See the https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#extendingvulkan-layers section for further details.

- `enabledExtensionCount` is the number of global extensions to enable.

- `ppEnabledExtensionNames` is a pointer to an array of `enabledExtensionCount` null-terminated UTF-8 strings containing the names of extensions to enable.

## Description

To capture events that occur while creating or destroying an instance, an application can link a VkDebugReportCallbackCreateInfoEXT structure or a VkDebugUtilsMessengerCreateInfoEXT structure to the `pNext` element of the `VkInstanceCreateInfo` structure given to `vkCreateInstance`. This callback is only valid for the duration of the vkCreateInstance and the vkDestroyInstance call. Use vkCreateDebugReportCallbackEXT or vkCreateDebugUtilsMessengerEXT to create persistent callback objects.

An application can add additional drivers by including the VkDirectDriverLoadingListLUNARG struct to the `pNext` element of the `VkInstanceCreateInfo` structure given to `vkCreateInstance`.

| Note VkDirectDriverLoadingListLUNARG allows applications to ship drivers with themselves. Only drivers that are designed to work with it should be used, such as drivers that implement Vulkan in software or that implement Vulkan by translating it to a different API. Any driver that requires installation should not be used, such as hardware drivers.

Valid Usage

- VUID-VkInstanceCreateInfo-pNext-04925
  If the `pNext` chain of `VkInstanceCreateInfo` includes a `VkDebugReportCallbackCreateInfoEXT` structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain `VK_EXT_debug_report`

- VUID-VkInstanceCreateInfo-pNext-04926
  If the `pNext` chain of `VkInstanceCreateInfo` includes a `VkDebugUtilsMessengerCreateInfoEXT` structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain `VK_EXT_debug_utils`

- VUID-VkInstanceCreateInfo-pNext-06779
  If the `pNext` chain includes a VkExportMetalObjectCreateInfoEXT structure, its `exportObjectType` member must be either `VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT` or `VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT`

- VUID-VkInstanceCreateInfo-flags-06559
  If `flags` has the `VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR` bit set, the list of enabled extensions in `ppEnabledExtensionNames` must contain `VK_KHR_portability_enumeration`

- VUID-VkInstanceCreateInfo-pNext
  If the `pNext` chain of `VkInstanceCreateInfo` includes a VkDirectDriverLoadingListLUNARG structure, the list of enabled extensions in `ppEnabledExtensionNames` must contain VK_LUNARG_direct_driver_loading

Valid Usage (Implicit)

- VUID-VkInstanceCreateInfo-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO`

- VUID-VkInstanceCreateInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkDebugReportCallbackCreateInfoEXT, VkDebugUtilsMessengerCreateInfoEXT, VkDirectDriverLoadingListLUNARG, VkExportMetalObjectCreateInfoEXT, VkValidationFeaturesEXT, or VkValidationFlagsEXT

- VUID-VkInstanceCreateInfo-sType-unique
  The `sType` value of each struct in the `pNext` chain must be unique, with the exception of structures of type VkDebugUtilsMessengerCreateInfoEXT or VkExportMetalObjectCreateInfoEXT

- VUID-VkInstanceCreateInfo-flags-parameter
  `flags` must be a valid combination of VkInstanceCreateFlagBits values

- VUID-VkInstanceCreateInfo-pApplicationInfo-parameter
  If `pApplicationInfo` is not `NULL`, `pApplicationInfo` must be a valid pointer to a valid VkApplicationInfo structure

- VUID-VkInstanceCreateInfo-ppEnabledLayerNames-parameter
  If `enabledLayerCount` is not `0`, `ppEnabledLayerNames` must be a valid pointer to an array of `enabledLayerCount` null-terminated UTF-8 strings

- VUID-VkInstanceCreateInfo-ppEnabledExtensionNames-parameter
  If `enabledExtensionCount` is not `0`, `ppEnabledExtensionNames` must be a valid pointer to an array of `enabledExtensionCount` null-terminated UTF-8 strings

## See Also

VK_VERSION_1_0, VkApplicationInfo, VkInstanceCreateFlags, VkStructureType, vkCreateInstance

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

SPDX-License-Identifier: CC-BY-4.0