Vulkan 1.0 implementations were required to return ERROR_INCOMPATIBLE_DRIVER if apiVersion was larger than 1.0. Implementations that support Vulkan 1.1 or later must not return ERROR_INCOMPATIBLE_DRIVER for any value of apiVersion .
Because Vulkan 1.0 implementations may fail with ERROR_INCOMPATIBLE_DRIVER, applications should determine the version of Vulkan available before calling CreateInstance. If the GetInstanceProcAddr returns NULL for EnumerateInstanceVersion, it is a Vulkan 1.0 implementation. Otherwise, the application can call EnumerateInstanceVersion to determine the version of Vulkan.
As long as the instance supports at least Vulkan 1.1, an application can use different versions of Vulkan with an instance than it does with a device or physical device.
The Khronos validation layers will treat apiVersion as the highest API version the application targets, and will validate API usage against the minimum of that version and the implementation version (instance or device, depending on context). If an application tries to use functionality from a greater version than this, a validation error will be triggered.
For example, if the instance supports Vulkan 1.1 and three physical devices support Vulkan 1.0, Vulkan 1.1, and Vulkan 1.2, respectively, and if the application sets apiVersion to 1.2, the application can use the following versions of Vulkan:
If we modify the above example so that the application sets apiVersion to 1.1, then the application must not use Vulkan 1.2 functionality on the physical device that supports Vulkan 1.2.
Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing an apiVersion of 0 is equivalent to providing an apiVersion of VK_MAKE_API_VERSION(0,1,0,0).
apiVersion is not 0, then it must be greater than or equal to API_VERSION_1_0sType must be STRUCTURE_TYPE_APPLICATION_INFOpNext must be NULLpApplicationName is not NULL, pApplicationName must be a null-terminated UTF-8 stringpEngineName is not NULL, pEngineName must be a null-terminated UTF-8 string
struct VkApplicationInfo {
VkStructureType sType;
void const * pNext;
char const * pApplicationName;
uint32_t applicationVersion;
char const * pEngineName;
uint32_t engineVersion;
uint32_t apiVersion;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkApplicationInfo.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | APIVERSION
The struct member offsets. |
| public static final int | APPLICATIONVERSION
The struct member offsets. |
| public static final int | ENGINEVERSION
The struct member offsets. |
| public static final int | PAPPLICATIONNAME
The struct member offsets. |
| public static final int | PENGINENAME
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkApplicationInfo(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public int | apiVersion()
must be the highest version of Vulkan that the application is designed to use, encoded as described in Version Numbers. |
| public VkApplicationInfo | |
| public int | applicationVersion()
an unsigned integer variable containing the developer-supplied version number of the application. |
| public VkApplicationInfo | |
| public static VkApplicationInfo | |
| public static VkApplicationInfo. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkApplicationInfo | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkApplicationInfo. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkApplicationInfo | |
| public static VkApplicationInfo | |
| public static VkApplicationInfo. | |
| public static VkApplicationInfo. | |
| protected VkApplicationInfo | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkApplicationInfo | |
| public static VkApplicationInfo | |
| public static VkApplicationInfo. | create(int
the buffer capacity capacity)Returns a new |
| public static VkApplicationInfo. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkApplicationInfo | |
| public static VkApplicationInfo. | |
| public int | engineVersion()
an unsigned integer variable containing the developer-supplied version number of the engine used to create the application. |
| public VkApplicationInfo | |
| public static VkApplicationInfo | |
| public static VkApplicationInfo. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkApplicationInfo | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkApplicationInfo. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkApplicationInfo | |
| public static VkApplicationInfo | |
| public static VkApplicationInfo. | |
| public static VkApplicationInfo. | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static ByteBuffer | |
| public static void | |
| public static String | |
| public static ByteBuffer | |
| public static void | |
| public static String | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public ByteBuffer | pApplicationName()
|
| public VkApplicationInfo | pApplicationName(ByteBuffer value)
Sets the address of the specified encoded string to the |
| public String | pApplicationNameString()
|
| public ByteBuffer | pEngineName()
|
| public VkApplicationInfo | pEngineName(ByteBuffer value)
Sets the address of the specified encoded string to the |
| public String | pEngineNameString()
|
| public long | |
| public VkApplicationInfo | |
| public VkApplicationInfo | set(int sType, long pNext, ByteBuffer pApplicationName, int applicationVersion, ByteBuffer pEngineName, int engineVersion, int apiVersion)
Initializes this struct with the specified values. |
| public VkApplicationInfo | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public VkApplicationInfo | |
| public VkApplicationInfo |