Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype VkDeviceCreateFlags = VkDeviceCreateFlags VkFlags
- newtype VkDeviceQueueCreateFlagBits = VkDeviceQueueCreateFlagBits VkFlags
- vkCreateDevice :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pCreateInfo" ::: Ptr VkDeviceCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pDevice" ::: Ptr VkDevice) -> IO VkResult
- vkDestroyDevice :: ("device" ::: VkDevice) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- data VkDeviceQueueCreateInfo = VkDeviceQueueCreateInfo {}
- data VkDeviceCreateInfo = VkDeviceCreateInfo {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkFlags :: VkDeviceCreateFlags
- vkQueueCreateInfoCount :: Word32
- vkPQueueCreateInfos :: Ptr VkDeviceQueueCreateInfo
- vkEnabledLayerCount :: Word32
- vkPPEnabledLayerNames :: Ptr (Ptr CChar)
- vkEnabledExtensionCount :: Word32
- vkPPEnabledExtensionNames :: Ptr (Ptr CChar)
- vkPEnabledFeatures :: Ptr VkPhysicalDeviceFeatures
- type VkDeviceQueueCreateFlags = VkDeviceQueueCreateFlagBits
Documentation
newtype VkDeviceCreateFlags Source #
VkDeviceCreateFlags - Reserved for future use
Description
VkDeviceCreateFlags
is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Instances
newtype VkDeviceQueueCreateFlagBits Source #
VkDeviceQueueCreateFlagBits - Bitmask specifying behavior of the queue
See Also
Instances
vkCreateDevice :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pCreateInfo" ::: Ptr VkDeviceCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pDevice" ::: Ptr VkDevice) -> IO VkResult Source #
vkCreateDevice - Create a new device instance
Parameters
physicalDevice
must be one of the device handles returned from a call tovkEnumeratePhysicalDevices
(see Physical Device Enumeration).
pCreateInfo
is a pointer to aVkDeviceCreateInfo
structure containing information about how to create the device.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pDevice
points to a handle in which the createdVkDevice
is returned.
Description
vkCreateDevice
verifies that extensions and features requested in the
ppEnabledExtensionNames
and pEnabledFeatures
members of
pCreateInfo
, respectively, are supported by the implementation. If any
requested extension is not supported, vkCreateDevice
must return
VK_ERROR_EXTENSION_NOT_PRESENT
. If any requested feature is not
supported, vkCreateDevice
must return
VK_ERROR_FEATURE_NOT_PRESENT
. Support for extensions can be checked
before creating a device by querying
vkEnumerateDeviceExtensionProperties
.
Support for features can similarly be checked by querying
vkGetPhysicalDeviceFeatures
.
After verifying and enabling the extensions the VkDevice
object is
created and returned to the application. If a requested extension is
only supported by a layer, both the layer and the extension need to be
specified at vkCreateInstance
time for the creation to succeed.
Multiple logical devices can be created from the same physical device.
Logical device creation may fail due to lack of device-specific
resources (in addition to the other errors). If that occurs,
vkCreateDevice
will return VK_ERROR_TOO_MANY_OBJECTS
.
Valid Usage
- All required
extensions
for each extension in the
VkDeviceCreateInfo
::ppEnabledExtensionNames
list must also be present in that list.
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handle
pCreateInfo
must be a valid pointer to a validVkDeviceCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pDevice
must be a valid pointer to aVkDevice
handle
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_INITIALIZATION_FAILED
VK_ERROR_EXTENSION_NOT_PRESENT
VK_ERROR_FEATURE_NOT_PRESENT
VK_ERROR_TOO_MANY_OBJECTS
VK_ERROR_DEVICE_LOST
See Also
VkAllocationCallbacks
,
VkDevice
,
VkDeviceCreateInfo
,
VkPhysicalDevice
vkDestroyDevice :: ("device" ::: VkDevice) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyDevice - Destroy a logical device
Parameters
device
is the logical device to destroy.
pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Description
To ensure that no work is active on the device,
vkDeviceWaitIdle
can be used to gate
the destruction of the device. Prior to destroying a device, an
application is responsible for destroying/freeing any Vulkan objects
that were created using that device as the first parameter of the
corresponding vkCreate*
or vkAllocate*
command.
Note
The lifetime of each of these objects is bound by the lifetime of the
VkDevice
object. Therefore, to avoid resource leaks, it is critical
that an application explicitly free all of these resources prior to
calling vkDestroyDevice
.
Valid Usage
- All child objects created on
device
must have been destroyed prior to destroyingdevice
- If
VkAllocationCallbacks
were provided whendevice
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whendevice
was created,pAllocator
must beNULL
Valid Usage (Implicit)
- If
device
is notNULL
,device
must be a validVkDevice
handle
- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure
Host Synchronization
- Host access to
device
must be externally synchronized
See Also
data VkDeviceQueueCreateInfo Source #
VkDeviceQueueCreateInfo - Structure specifying parameters of a newly created device queue
Valid Usage
queueFamilyIndex
must be less thanpQueueFamilyPropertyCount
returned byvkGetPhysicalDeviceQueueFamilyProperties
queueCount
must be less than or equal to thequeueCount
member of theVkQueueFamilyProperties
structure, as returned byvkGetPhysicalDeviceQueueFamilyProperties
in thepQueueFamilyProperties
[queueFamilyIndex
]- Each element of
pQueuePriorities
must be between0.0
and1.0
inclusive
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
pNext
must beNULL
or a pointer to a valid instance ofVkDeviceQueueGlobalPriorityCreateInfoEXT
flags
must be a valid combination ofVkDeviceQueueCreateFlagBits
valuespQueuePriorities
must be a valid pointer to an array ofqueueCount
float
valuesqueueCount
must be greater than0
See Also
VkDeviceCreateInfo
, VkDeviceQueueCreateFlags
,
VkStructureType
VkDeviceQueueCreateInfo | |
|
Instances
Eq VkDeviceQueueCreateInfo Source # | |
Show VkDeviceQueueCreateInfo Source # | |
showsPrec :: Int -> VkDeviceQueueCreateInfo -> ShowS # show :: VkDeviceQueueCreateInfo -> String # showList :: [VkDeviceQueueCreateInfo] -> ShowS # | |
Storable VkDeviceQueueCreateInfo Source # | |
sizeOf :: VkDeviceQueueCreateInfo -> Int # alignment :: VkDeviceQueueCreateInfo -> Int # peekElemOff :: Ptr VkDeviceQueueCreateInfo -> Int -> IO VkDeviceQueueCreateInfo # pokeElemOff :: Ptr VkDeviceQueueCreateInfo -> Int -> VkDeviceQueueCreateInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO VkDeviceQueueCreateInfo # pokeByteOff :: Ptr b -> Int -> VkDeviceQueueCreateInfo -> IO () # peek :: Ptr VkDeviceQueueCreateInfo -> IO VkDeviceQueueCreateInfo # poke :: Ptr VkDeviceQueueCreateInfo -> VkDeviceQueueCreateInfo -> IO () # |
data VkDeviceCreateInfo Source #
VkDeviceCreateInfo - Structure specifying parameters of a newly created device
Valid Usage
- The
queueFamilyIndex
member of each element ofpQueueCreateInfos
must be unique withinpQueueCreateInfos
- If the
pNext
chain includes aVkPhysicalDeviceFeatures2
structure, thenpEnabledFeatures
must beNULL
ppEnabledExtensionNames
must not contain both{html_spec_relative}#VK_KHR_maintenance1
and{html_spec_relative}#VK_AMD_negative_viewport_height
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDeviceGroupDeviceCreateInfo
,VkPhysicalDevice16BitStorageFeatures
,VkPhysicalDeviceDescriptorIndexingFeaturesEXT
,VkPhysicalDeviceFeatures2
,VkPhysicalDeviceMultiviewFeatures
,VkPhysicalDeviceProtectedMemoryFeatures
,VkPhysicalDeviceSamplerYcbcrConversionFeatures
, orVkPhysicalDeviceVariablePointerFeatures
- Each
sType
member in thepNext
chain must be unique flags
must be0
pQueueCreateInfos
must be a valid pointer to an array ofqueueCreateInfoCount
validVkDeviceQueueCreateInfo
structures- If
enabledLayerCount
is not0
,ppEnabledLayerNames
must be a valid pointer to an array ofenabledLayerCount
null-terminated UTF-8 strings - If
enabledExtensionCount
is not0
,ppEnabledExtensionNames
must be a valid pointer to an array ofenabledExtensionCount
null-terminated UTF-8 strings - If
pEnabledFeatures
is notNULL
,pEnabledFeatures
must be a valid pointer to a validVkPhysicalDeviceFeatures
structure queueCreateInfoCount
must be greater than0
See Also
VkDeviceCreateFlags
, VkDeviceQueueCreateInfo
,
VkPhysicalDeviceFeatures
,
VkStructureType
, vkCreateDevice
VkDeviceCreateInfo | |
|
Instances
Eq VkDeviceCreateInfo Source # | |
(==) :: VkDeviceCreateInfo -> VkDeviceCreateInfo -> Bool # (/=) :: VkDeviceCreateInfo -> VkDeviceCreateInfo -> Bool # | |
Show VkDeviceCreateInfo Source # | |
showsPrec :: Int -> VkDeviceCreateInfo -> ShowS # show :: VkDeviceCreateInfo -> String # showList :: [VkDeviceCreateInfo] -> ShowS # | |
Storable VkDeviceCreateInfo Source # | |
sizeOf :: VkDeviceCreateInfo -> Int # alignment :: VkDeviceCreateInfo -> Int # peekElemOff :: Ptr VkDeviceCreateInfo -> Int -> IO VkDeviceCreateInfo # pokeElemOff :: Ptr VkDeviceCreateInfo -> Int -> VkDeviceCreateInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO VkDeviceCreateInfo # pokeByteOff :: Ptr b -> Int -> VkDeviceCreateInfo -> IO () # peek :: Ptr VkDeviceCreateInfo -> IO VkDeviceCreateInfo # poke :: Ptr VkDeviceCreateInfo -> VkDeviceCreateInfo -> IO () # |
type VkDeviceQueueCreateFlags = VkDeviceQueueCreateFlagBits Source #
VkDeviceQueueCreateFlags - Bitmask of VkDeviceQueueCreateFlagBits
Description
VkDeviceQueueCreateFlags
is a bitmask type for setting a mask of zero
or more VkDeviceQueueCreateFlagBits
.
See Also
VkDeviceQueueCreateFlagBits
, VkDeviceQueueCreateInfo
,
VkDeviceQueueInfo2