| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.Device
- 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
Constructors
| VkDeviceCreateFlags VkFlags |
newtype VkDeviceQueueCreateFlagBits Source #
VkDeviceQueueCreateFlagBits - Bitmask specifying behavior of the queue
See Also
Constructors
| VkDeviceQueueCreateFlagBits VkFlags |
Instances
vkCreateDevice :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pCreateInfo" ::: Ptr VkDeviceCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pDevice" ::: Ptr VkDevice) -> IO VkResult Source #
vkCreateDevice - Create a new device instance
Parameters
physicalDevicemust be one of the device handles returned from a call tovkEnumeratePhysicalDevices(see Physical Device Enumeration).
pCreateInfois a pointer to aVkDeviceCreateInfostructure containing information about how to create the device.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pDevicepoints to a handle in which the createdVkDeviceis 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::ppEnabledExtensionNameslist must also be present in that list.
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandle
pCreateInfomust be a valid pointer to a validVkDeviceCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pDevicemust be a valid pointer to aVkDevicehandle
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_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
deviceis the logical device to destroy.
pAllocatorcontrols 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
devicemust have been destroyed prior to destroyingdevice
- If
VkAllocationCallbackswere provided whendevicewas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whendevicewas created,pAllocatormust beNULL
Valid Usage (Implicit)
- If
deviceis notNULL,devicemust be a validVkDevicehandle
- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure
Host Synchronization
- Host access to
devicemust be externally synchronized
See Also
data VkDeviceQueueCreateInfo Source #
VkDeviceQueueCreateInfo - Structure specifying parameters of a newly created device queue
Description
Valid Usage
queueFamilyIndexmust be less thanpQueueFamilyPropertyCountreturned byvkGetPhysicalDeviceQueueFamilyProperties
queueCountmust be less than or equal to thequeueCountmember of theVkQueueFamilyPropertiesstructure, as returned byvkGetPhysicalDeviceQueueFamilyPropertiesin thepQueueFamilyProperties[queueFamilyIndex]- Each element of
pQueuePrioritiesmust be between0.0and1.0inclusive
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
pNextmust beNULLor a pointer to a valid instance ofVkDeviceQueueGlobalPriorityCreateInfoEXTflagsmust be a valid combination ofVkDeviceQueueCreateFlagBitsvaluespQueuePrioritiesmust be a valid pointer to an array ofqueueCountfloatvaluesqueueCountmust be greater than0
See Also
VkDeviceCreateInfo, VkDeviceQueueCreateFlags,
VkStructureType
Constructors
| VkDeviceQueueCreateInfo | |
Fields
| |
data VkDeviceCreateInfo Source #
VkDeviceCreateInfo - Structure specifying parameters of a newly created device
Description
Valid Usage
- The
queueFamilyIndexmember of each element ofpQueueCreateInfosmust be unique withinpQueueCreateInfos
- If the
pNextchain includes aVkPhysicalDeviceFeatures2structure, thenpEnabledFeaturesmust beNULL ppEnabledExtensionNamesmust not contain both{html_spec_relative}#VK_KHR_maintenance1and{html_spec_relative}#VK_AMD_negative_viewport_height
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDeviceGroupDeviceCreateInfo,VkPhysicalDevice16BitStorageFeatures,VkPhysicalDeviceDescriptorIndexingFeaturesEXT,VkPhysicalDeviceFeatures2,VkPhysicalDeviceMultiviewFeatures,VkPhysicalDeviceProtectedMemoryFeatures,VkPhysicalDeviceSamplerYcbcrConversionFeatures, orVkPhysicalDeviceVariablePointerFeatures - Each
sTypemember in thepNextchain must be unique flagsmust be0pQueueCreateInfosmust be a valid pointer to an array ofqueueCreateInfoCountvalidVkDeviceQueueCreateInfostructures- If
enabledLayerCountis not0,ppEnabledLayerNamesmust be a valid pointer to an array ofenabledLayerCountnull-terminated UTF-8 strings - If
enabledExtensionCountis not0,ppEnabledExtensionNamesmust be a valid pointer to an array ofenabledExtensionCountnull-terminated UTF-8 strings - If
pEnabledFeaturesis notNULL,pEnabledFeaturesmust be a valid pointer to a validVkPhysicalDeviceFeaturesstructure queueCreateInfoCountmust be greater than0
See Also
VkDeviceCreateFlags, VkDeviceQueueCreateInfo,
VkPhysicalDeviceFeatures,
VkStructureType, vkCreateDevice
Constructors
| VkDeviceCreateInfo | |
Fields
| |
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