Class VkInstanceCreateInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
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 CreateInstance and the DestroyInstance call. Use CreateDebugReportCallbackEXT or CreateDebugUtilsMessengerEXT 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
- If the
pNextchain ofVkInstanceCreateInfoincludes aVkDebugReportCallbackCreateInfoEXTstructure, the list of enabled extensions inppEnabledExtensionNamesmust containVK_EXT_debug_report - If the
pNextchain ofVkInstanceCreateInfoincludes aVkDebugUtilsMessengerCreateInfoEXTstructure, the list of enabled extensions inppEnabledExtensionNamesmust containVK_EXT_debug_utils - If the
pNextchain includes aVkExportMetalObjectCreateInfoEXTstructure, itsexportObjectTypemember must be eitherEXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXTorEXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT - If
flagshas theINSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHRbit set, the list of enabled extensions inppEnabledExtensionNamesmust containVK_KHR_portability_enumeration - If the
pNextchain ofVkInstanceCreateInfoincludes aVkDirectDriverLoadingListLUNARGstructure, the list of enabled extensions inppEnabledExtensionNamesmust containVK_LUNARG_direct_driver_loading - If the
pNextchain ofVkInstanceCreateInfoincludes aVkLayerSettingsCreateInfoEXTstructure, the list of enabled extensions inppEnabledExtensionNamesmust containVK_EXT_layer_settings - If the
pNextchain ofVkInstanceCreateInfoincludes aVkValidationFeaturesEXTstructure, the list of enabled extensions inppEnabledExtensionNamesmust containVK_EXT_validation_features - If the
pNextchain ofVkInstanceCreateInfoincludes aVkValidationFlagsEXTstructure, the list of enabled extensions inppEnabledExtensionNamesmust containVK_EXT_validation_flags
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_INSTANCE_CREATE_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDebugReportCallbackCreateInfoEXT,VkDebugUtilsMessengerCreateInfoEXT,VkDirectDriverLoadingListLUNARG,VkExportMetalObjectCreateInfoEXT,VkLayerSettingsCreateInfoEXT,VkValidationFeaturesEXT, orVkValidationFlagsEXT - The
sTypevalue of each struct in thepNextchain must be unique, with the exception of structures of typeVkDebugUtilsMessengerCreateInfoEXT,VkExportMetalObjectCreateInfoEXT, orVkLayerSettingsCreateInfoEXT flagsmust be a valid combination ofVkInstanceCreateFlagBitsvalues- If
pApplicationInfois notNULL,pApplicationInfomust be a valid pointer to a validVkApplicationInfostructure - If
enabledLayerCountis not 0,ppEnabledLayerNamesmust be a valid pointer to an array ofenabledLayerCountnull-terminated UTF-8 strings - If
enabledExtensionCountis not 0,ppEnabledExtensionNamesmust be a valid pointer to an array ofenabledExtensionCountnull-terminated UTF-8 strings
See Also
VkApplicationInfo, CreateInstance
Layout
struct VkInstanceCreateInfo {
VkStructureType sType();
void const * pNext();
VkInstanceCreateFlags flags();
VkApplicationInfo const * pApplicationInfo();
uint32_t enabledLayerCount();
char const * const * ppEnabledLayerNames();
uint32_t enabledExtensionCount();
char const * const * ppEnabledExtensionNames();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkInstanceCreateInfo(ByteBuffer container) Creates aVkInstanceCreateInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkInstanceCreateInfocalloc()Returns a newVkInstanceCreateInfoinstance allocated withmemCalloc.static VkInstanceCreateInfo.Buffercalloc(int capacity) Returns a newVkInstanceCreateInfo.Bufferinstance allocated withmemCalloc.static VkInstanceCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkInstanceCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkInstanceCreateInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkInstanceCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkInstanceCreateInfoDeprecated.static VkInstanceCreateInfo.BuffercallocStack(int capacity) Deprecated.static VkInstanceCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkInstanceCreateInfocallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkInstanceCreateInfocreate()Returns a newVkInstanceCreateInfoinstance allocated withBufferUtils.static VkInstanceCreateInfo.Buffercreate(int capacity) Returns a newVkInstanceCreateInfo.Bufferinstance allocated withBufferUtils.static VkInstanceCreateInfocreate(long address) Returns a newVkInstanceCreateInfoinstance for the specified memory address.static VkInstanceCreateInfo.Buffercreate(long address, int capacity) Create aVkInstanceCreateInfo.Bufferinstance at the specified memory.static @Nullable VkInstanceCreateInfocreateSafe(long address) static @Nullable VkInstanceCreateInfo.BuffercreateSafe(long address, int capacity) intthe number of global extensions to enable.intthe number of global layers to enable.intflags()a bitmask ofVkInstanceCreateFlagBitsindicating the behavior of the instance.flags(int value) Sets the specified value to theflags()field.static VkInstanceCreateInfomalloc()Returns a newVkInstanceCreateInfoinstance allocated withmemAlloc.static VkInstanceCreateInfo.Buffermalloc(int capacity) Returns a newVkInstanceCreateInfo.Bufferinstance allocated withmemAlloc.static VkInstanceCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkInstanceCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkInstanceCreateInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkInstanceCreateInfoinstance allocated on the specifiedMemoryStack.static VkInstanceCreateInfoDeprecated.static VkInstanceCreateInfo.BuffermallocStack(int capacity) Deprecated.static VkInstanceCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkInstanceCreateInfomallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intnenabledExtensionCount(long struct) Unsafe version ofenabledExtensionCount().static voidnenabledExtensionCount(long struct, int value) Sets the specified value to theenabledExtensionCountfield of the specifiedstruct.static intnenabledLayerCount(long struct) Unsafe version ofenabledLayerCount().static voidnenabledLayerCount(long struct, int value) Sets the specified value to theenabledLayerCountfield of the specifiedstruct.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static @Nullable VkApplicationInfonpApplicationInfo(long struct) Unsafe version ofpApplicationInfo().static voidnpApplicationInfo(long struct, @Nullable VkApplicationInfo value) Unsafe version ofpApplicationInfo.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static @Nullable org.lwjgl.PointerBuffernppEnabledExtensionNames(long struct) Unsafe version ofppEnabledExtensionNames.static voidnppEnabledExtensionNames(long struct, @Nullable org.lwjgl.PointerBuffer value) Unsafe version ofppEnabledExtensionNames.static @Nullable org.lwjgl.PointerBuffernppEnabledLayerNames(long struct) Unsafe version ofppEnabledLayerNames.static voidnppEnabledLayerNames(long struct, @Nullable org.lwjgl.PointerBuffer value) Unsafe version ofppEnabledLayerNames.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.@Nullable VkApplicationInfoNULLor a pointer to aVkApplicationInfostructure.pApplicationInfo(@Nullable VkApplicationInfo value) Sets the address of the specifiedVkApplicationInfoto thepApplicationInfo()field.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.Prepends the specifiedVkDebugReportCallbackCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkDebugUtilsMessengerCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkDirectDriverLoadingListLUNARGvalue to thepNextchain.Prepends the specifiedVkExportMetalObjectCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkLayerSettingsCreateInfoEXTvalue to thepNextchain.pNext(VkValidationFeaturesEXT value) Prepends the specifiedVkValidationFeaturesEXTvalue to thepNextchain.pNext(VkValidationFlagsEXT value) Prepends the specifiedVkValidationFlagsEXTvalue to thepNextchain.@Nullable org.lwjgl.PointerBuffera pointer to an array ofenabledExtensionCountnull-terminated UTF-8 strings containing the names of extensions to enable.ppEnabledExtensionNames(@Nullable org.lwjgl.PointerBuffer value) Sets the address of the specifiedPointerBufferto theppEnabledExtensionNames()field.@Nullable org.lwjgl.PointerBuffera pointer to an array ofenabledLayerCountnull-terminated UTF-8 strings containing the names of layers to enable for the created instance.ppEnabledLayerNames(@Nullable org.lwjgl.PointerBuffer value) Sets the address of the specifiedPointerBufferto theppEnabledLayerNames()field.set(int sType, long pNext, int flags, @Nullable VkApplicationInfo pApplicationInfo, @Nullable org.lwjgl.PointerBuffer ppEnabledLayerNames, @Nullable org.lwjgl.PointerBuffer ppEnabledExtensionNames) Initializes this struct with the specified values.set(VkInstanceCreateInfo src) Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_INSTANCE_CREATE_INFOvalue to thesType()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
PAPPLICATIONINFO
public static final int PAPPLICATIONINFOThe struct member offsets. -
ENABLEDLAYERCOUNT
public static final int ENABLEDLAYERCOUNTThe struct member offsets. -
PPENABLEDLAYERNAMES
public static final int PPENABLEDLAYERNAMESThe struct member offsets. -
ENABLEDEXTENSIONCOUNT
public static final int ENABLEDEXTENSIONCOUNTThe struct member offsets. -
PPENABLEDEXTENSIONNAMES
public static final int PPENABLEDEXTENSIONNAMESThe struct member offsets.
-
-
Constructor Details
-
VkInstanceCreateInfo
Creates aVkInstanceCreateInfoinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkInstanceCreateInfo>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
flags
public int flags()a bitmask ofVkInstanceCreateFlagBitsindicating the behavior of the instance. -
pApplicationInfo
NULLor a pointer to aVkApplicationInfostructure. If notNULL, this information helps implementations recognize behavior inherent to classes of applications.VkApplicationInfois defined in detail below. -
enabledLayerCount
public int enabledLayerCount()the number of global layers to enable. -
ppEnabledLayerNames
public @Nullable org.lwjgl.PointerBuffer ppEnabledLayerNames()a pointer to an array ofenabledLayerCountnull-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 Layers section for further details. -
enabledExtensionCount
public int enabledExtensionCount()the number of global extensions to enable. -
ppEnabledExtensionNames
public @Nullable org.lwjgl.PointerBuffer ppEnabledExtensionNames()a pointer to an array ofenabledExtensionCountnull-terminated UTF-8 strings containing the names of extensions to enable. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_INSTANCE_CREATE_INFOvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkDebugReportCallbackCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkDebugUtilsMessengerCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkDirectDriverLoadingListLUNARGvalue to thepNextchain. -
pNext
Prepends the specifiedVkExportMetalObjectCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkLayerSettingsCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkValidationFeaturesEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkValidationFlagsEXTvalue to thepNextchain. -
flags
Sets the specified value to theflags()field. -
pApplicationInfo
Sets the address of the specifiedVkApplicationInfoto thepApplicationInfo()field. -
ppEnabledLayerNames
Sets the address of the specifiedPointerBufferto theppEnabledLayerNames()field. -
ppEnabledExtensionNames
Sets the address of the specifiedPointerBufferto theppEnabledExtensionNames()field. -
set
public VkInstanceCreateInfo set(int sType, long pNext, int flags, @Nullable VkApplicationInfo pApplicationInfo, @Nullable org.lwjgl.PointerBuffer ppEnabledLayerNames, @Nullable org.lwjgl.PointerBuffer ppEnabledExtensionNames) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkInstanceCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkInstanceCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkInstanceCreateInfoinstance allocated withBufferUtils. -
create
Returns a newVkInstanceCreateInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkInstanceCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkInstanceCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkInstanceCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkInstanceCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkInstanceCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkInstanceCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkInstanceCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkInstanceCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkInstanceCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkInstanceCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nflags
public static int nflags(long struct) Unsafe version offlags(). -
npApplicationInfo
Unsafe version ofpApplicationInfo(). -
nenabledLayerCount
public static int nenabledLayerCount(long struct) Unsafe version ofenabledLayerCount(). -
nppEnabledLayerNames
public static @Nullable org.lwjgl.PointerBuffer nppEnabledLayerNames(long struct) Unsafe version ofppEnabledLayerNames. -
nenabledExtensionCount
public static int nenabledExtensionCount(long struct) Unsafe version ofenabledExtensionCount(). -
nppEnabledExtensionNames
public static @Nullable org.lwjgl.PointerBuffer nppEnabledExtensionNames(long struct) Unsafe version ofppEnabledExtensionNames. -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags. -
npApplicationInfo
Unsafe version ofpApplicationInfo. -
nenabledLayerCount
public static void nenabledLayerCount(long struct, int value) Sets the specified value to theenabledLayerCountfield of the specifiedstruct. -
nppEnabledLayerNames
public static void nppEnabledLayerNames(long struct, @Nullable org.lwjgl.PointerBuffer value) Unsafe version ofppEnabledLayerNames. -
nenabledExtensionCount
public static void nenabledExtensionCount(long struct, int value) Sets the specified value to theenabledExtensionCountfield of the specifiedstruct. -
nppEnabledExtensionNames
public static void nppEnabledExtensionNames(long struct, @Nullable org.lwjgl.PointerBuffer value) Unsafe version ofppEnabledExtensionNames. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-