Class VkInstanceCreateInfo
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,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
pNext
chain ofVkInstanceCreateInfo
includes aVkDebugReportCallbackCreateInfoEXT
structure, the list of enabled extensions inppEnabledExtensionNames
must containVK_EXT_debug_report
- If the
pNext
chain ofVkInstanceCreateInfo
includes aVkDebugUtilsMessengerCreateInfoEXT
structure, the list of enabled extensions inppEnabledExtensionNames
must containVK_EXT_debug_utils
- If the
pNext
chain includes aVkExportMetalObjectCreateInfoEXT
structure, itsexportObjectType
member must be eitherEXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT
orEXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT
- If
flags
has theINSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR
bit set, the list of enabled extensions inppEnabledExtensionNames
must containVK_KHR_portability_enumeration
- If the
pNext
chain ofVkInstanceCreateInfo
includes aVkDirectDriverLoadingListLUNARG
structure, the list of enabled extensions inppEnabledExtensionNames
must containVK_LUNARG_direct_driver_loading
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_INSTANCE_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDebugReportCallbackCreateInfoEXT
,VkDebugUtilsMessengerCreateInfoEXT
,VkDirectDriverLoadingListLUNARG
,VkExportMetalObjectCreateInfoEXT
,VkValidationFeaturesEXT
, orVkValidationFlagsEXT
- The
sType
value of each struct in thepNext
chain must be unique, with the exception of structures of typeVkDebugUtilsMessengerCreateInfoEXT
orVkExportMetalObjectCreateInfoEXT
flags
must be a valid combination ofVkInstanceCreateFlagBits
values- If
pApplicationInfo
is notNULL
,pApplicationInfo
must be a valid pointer to a validVkApplicationInfo
structure - If
enabledLayerCount
is not 0,ppEnabledLayerNames
must be a valid pointer to an array ofenabledLayerCount
null-terminated UTF-8 strings - If
enabledExtensionCount
is not 0,ppEnabledExtensionNames
must be a valid pointer to an array ofenabledExtensionCount
null-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 classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkInstanceCreateInfo
(ByteBuffer container) Creates aVkInstanceCreateInfo
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkInstanceCreateInfo
calloc()
Returns a newVkInstanceCreateInfo
instance allocated withmemCalloc
.static VkInstanceCreateInfo.Buffer
calloc
(int capacity) Returns a newVkInstanceCreateInfo.Buffer
instance allocated withmemCalloc
.static VkInstanceCreateInfo.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newVkInstanceCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkInstanceCreateInfo
calloc
(MemoryStack stack) Returns a newVkInstanceCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkInstanceCreateInfo
Deprecated.static VkInstanceCreateInfo.Buffer
callocStack
(int capacity) Deprecated.static VkInstanceCreateInfo.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static VkInstanceCreateInfo
callocStack
(MemoryStack stack) Deprecated.static VkInstanceCreateInfo
create()
Returns a newVkInstanceCreateInfo
instance allocated withBufferUtils
.static VkInstanceCreateInfo.Buffer
create
(int capacity) Returns a newVkInstanceCreateInfo.Buffer
instance allocated withBufferUtils
.static VkInstanceCreateInfo
create
(long address) Returns a newVkInstanceCreateInfo
instance for the specified memory address.static VkInstanceCreateInfo.Buffer
create
(long address, int capacity) Create aVkInstanceCreateInfo.Buffer
instance at the specified memory.static VkInstanceCreateInfo
createSafe
(long address) static VkInstanceCreateInfo.Buffer
createSafe
(long address, int capacity) int
the number of global extensions to enable.int
the number of global layers to enable.int
flags()
a bitmask ofVkInstanceCreateFlagBits
indicating the behavior of the instance.flags
(int value) Sets the specified value to theflags()
field.static VkInstanceCreateInfo
malloc()
Returns a newVkInstanceCreateInfo
instance allocated withmemAlloc
.static VkInstanceCreateInfo.Buffer
malloc
(int capacity) Returns a newVkInstanceCreateInfo.Buffer
instance allocated withmemAlloc
.static VkInstanceCreateInfo.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newVkInstanceCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkInstanceCreateInfo
malloc
(MemoryStack stack) Returns a newVkInstanceCreateInfo
instance allocated on the specifiedMemoryStack
.static VkInstanceCreateInfo
Deprecated.static VkInstanceCreateInfo.Buffer
mallocStack
(int capacity) Deprecated.static VkInstanceCreateInfo.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkInstanceCreateInfo
mallocStack
(MemoryStack stack) Deprecated.static int
nenabledExtensionCount
(long struct) Unsafe version ofenabledExtensionCount()
.static void
nenabledExtensionCount
(long struct, int value) Sets the specified value to theenabledExtensionCount
field of the specifiedstruct
.static int
nenabledLayerCount
(long struct) Unsafe version ofenabledLayerCount()
.static void
nenabledLayerCount
(long struct, int value) Sets the specified value to theenabledLayerCount
field of the specifiedstruct
.static int
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, int value) Unsafe version offlags
.static VkApplicationInfo
npApplicationInfo
(long struct) Unsafe version ofpApplicationInfo()
.static void
npApplicationInfo
(long struct, VkApplicationInfo value) Unsafe version ofpApplicationInfo
.static long
npNext
(long struct) Unsafe version ofpNext()
.static void
npNext
(long struct, long value) Unsafe version ofpNext
.static PointerBuffer
nppEnabledExtensionNames
(long struct) Unsafe version ofppEnabledExtensionNames
.static void
nppEnabledExtensionNames
(long struct, PointerBuffer value) Unsafe version ofppEnabledExtensionNames
.static PointerBuffer
nppEnabledLayerNames
(long struct) Unsafe version ofppEnabledLayerNames
.static void
nppEnabledLayerNames
(long struct, PointerBuffer value) Unsafe version ofppEnabledLayerNames
.static int
nsType
(long struct) Unsafe version ofsType()
.static void
nsType
(long struct, int value) Unsafe version ofsType
.NULL
or a pointer to aVkApplicationInfo
structure.Sets the address of the specifiedVkApplicationInfo
to thepApplicationInfo()
field.long
pNext()
NULL
or a pointer to a structure extending this structure.pNext
(long value) Sets the specified value to thepNext()
field.Prepends the specifiedVkDebugReportCallbackCreateInfoEXT
value to thepNext
chain.Prepends the specifiedVkDebugUtilsMessengerCreateInfoEXT
value to thepNext
chain.Prepends the specifiedVkDirectDriverLoadingListLUNARG
value to thepNext
chain.Prepends the specifiedVkExportMetalObjectCreateInfoEXT
value to thepNext
chain.pNext
(VkValidationFeaturesEXT value) Prepends the specifiedVkValidationFeaturesEXT
value to thepNext
chain.pNext
(VkValidationFlagsEXT value) Prepends the specifiedVkValidationFlagsEXT
value to thepNext
chain.a pointer to an array ofenabledExtensionCount
null-terminated UTF-8 strings containing the names of extensions to enable.Sets the address of the specifiedPointerBuffer
to theppEnabledExtensionNames()
field.a pointer to an array ofenabledLayerCount
null-terminated UTF-8 strings containing the names of layers to enable for the created instance.ppEnabledLayerNames
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to theppEnabledLayerNames()
field.set
(int sType, long pNext, int flags, VkApplicationInfo pApplicationInfo, PointerBuffer ppEnabledLayerNames, PointerBuffer ppEnabledExtensionNames) Initializes this struct with the specified values.set
(VkInstanceCreateInfo src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
sType()
aVkStructureType
value identifying this structure.sType
(int value) Sets the specified value to thesType()
field.Sets theSTRUCTURE_TYPE_INSTANCE_CREATE_INFO
value to thesType()
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aVkInstanceCreateInfo
instance at the current position of the specifiedByteBuffer
container. 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()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkInstanceCreateInfo>
-
sType
public int sType()aVkStructureType
value identifying this structure. -
pNext
public long pNext()NULL
or a pointer to a structure extending this structure. -
flags
public int flags()a bitmask ofVkInstanceCreateFlagBits
indicating the behavior of the instance. -
pApplicationInfo
NULL
or a pointer to aVkApplicationInfo
structure. If notNULL
, this information helps implementations recognize behavior inherent to classes of applications.VkApplicationInfo
is defined in detail below. -
enabledLayerCount
public int enabledLayerCount()the number of global layers to enable. -
ppEnabledLayerNames
a pointer to an array ofenabledLayerCount
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 Layers section for further details. -
enabledExtensionCount
public int enabledExtensionCount()the number of global extensions to enable. -
ppEnabledExtensionNames
a pointer to an array ofenabledExtensionCount
null-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_INFO
value to thesType()
field. -
pNext
Sets the specified value to thepNext()
field. -
pNext
Prepends the specifiedVkDebugReportCallbackCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkDebugUtilsMessengerCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkDirectDriverLoadingListLUNARG
value to thepNext
chain. -
pNext
Prepends the specifiedVkExportMetalObjectCreateInfoEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkValidationFeaturesEXT
value to thepNext
chain. -
pNext
Prepends the specifiedVkValidationFlagsEXT
value to thepNext
chain. -
flags
Sets the specified value to theflags()
field. -
pApplicationInfo
Sets the address of the specifiedVkApplicationInfo
to thepApplicationInfo()
field. -
ppEnabledLayerNames
Sets the address of the specifiedPointerBuffer
to theppEnabledLayerNames()
field. -
ppEnabledExtensionNames
Sets the address of the specifiedPointerBuffer
to theppEnabledExtensionNames()
field. -
set
public VkInstanceCreateInfo set(int sType, long pNext, int flags, @Nullable VkApplicationInfo pApplicationInfo, @Nullable PointerBuffer ppEnabledLayerNames, @Nullable 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 newVkInstanceCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkInstanceCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkInstanceCreateInfo
instance allocated withBufferUtils
. -
create
Returns a newVkInstanceCreateInfo
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkInstanceCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkInstanceCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkInstanceCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkInstanceCreateInfo.Buffer
instance 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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkInstanceCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkInstanceCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkInstanceCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkInstanceCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and 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
Unsafe version ofppEnabledLayerNames
. -
nenabledExtensionCount
public static int nenabledExtensionCount(long struct) Unsafe version ofenabledExtensionCount()
. -
nppEnabledExtensionNames
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 theenabledLayerCount
field of the specifiedstruct
. -
nppEnabledLayerNames
Unsafe version ofppEnabledLayerNames
. -
nenabledExtensionCount
public static void nenabledExtensionCount(long struct, int value) Sets the specified value to theenabledExtensionCount
field of the specifiedstruct
. -
nppEnabledExtensionNames
Unsafe version ofppEnabledExtensionNames
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-