vulkan-2.0.0.1: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.Device

Synopsis

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

VkDeviceCreateInfo

Instances
Eq VkDeviceCreateFlags Source # 
Instance details
Ord VkDeviceCreateFlags Source # 
Instance details
Read VkDeviceCreateFlags Source # 
Instance details
Show VkDeviceCreateFlags Source # 
Instance details
Storable VkDeviceCreateFlags Source # 
Instance details
Bits VkDeviceCreateFlags Source # 
Instance details
FiniteBits VkDeviceCreateFlags Source # 
Instance details

newtype VkDeviceQueueCreateFlagBits Source #

VkDeviceQueueCreateFlagBits - Bitmask specifying behavior of the queue

See Also

VkDeviceQueueCreateFlags

Instances
Eq VkDeviceQueueCreateFlagBits Source # 
Instance details
Ord VkDeviceQueueCreateFlagBits Source # 
Instance details
Read VkDeviceQueueCreateFlagBits Source # 
Instance details
Show VkDeviceQueueCreateFlagBits Source # 
Instance details
Storable VkDeviceQueueCreateFlagBits Source # 
Instance details
Bits VkDeviceQueueCreateFlagBits Source # 
Instance details

Methods

(.&.) :: VkDeviceQueueCreateFlagBits -> VkDeviceQueueCreateFlagBits -> VkDeviceQueueCreateFlagBits #

(.|.) :: VkDeviceQueueCreateFlagBits -> VkDeviceQueueCreateFlagBits -> VkDeviceQueueCreateFlagBits #

xor :: VkDeviceQueueCreateFlagBits -> VkDeviceQueueCreateFlagBits -> VkDeviceQueueCreateFlagBits #

complement :: VkDeviceQueueCreateFlagBits -> VkDeviceQueueCreateFlagBits #

shift :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

rotate :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

zeroBits :: VkDeviceQueueCreateFlagBits #

bit :: Int -> VkDeviceQueueCreateFlagBits #

setBit :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

clearBit :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

complementBit :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

testBit :: VkDeviceQueueCreateFlagBits -> Int -> Bool #

bitSizeMaybe :: VkDeviceQueueCreateFlagBits -> Maybe Int #

bitSize :: VkDeviceQueueCreateFlagBits -> Int #

isSigned :: VkDeviceQueueCreateFlagBits -> Bool #

shiftL :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

unsafeShiftL :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

shiftR :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

unsafeShiftR :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

rotateL :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

rotateR :: VkDeviceQueueCreateFlagBits -> Int -> VkDeviceQueueCreateFlagBits #

popCount :: VkDeviceQueueCreateFlagBits -> Int #

FiniteBits VkDeviceQueueCreateFlagBits Source # 
Instance details

vkCreateDevice :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pCreateInfo" ::: Ptr VkDeviceCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pDevice" ::: Ptr VkDevice) -> IO VkResult Source #

vkCreateDevice - Create a new device instance

Parameters

  • pCreateInfo is a pointer to a VkDeviceCreateInfo 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 created VkDevice 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

Valid Usage (Implicit)

  • physicalDevice must be a valid VkPhysicalDevice handle
  • pCreateInfo must be a valid pointer to a valid VkDeviceCreateInfo structure
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
  • pDevice must be a valid pointer to a VkDevice 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 destroying device
  • If VkAllocationCallbacks were provided when device was created, a compatible set of callbacks must be provided here
  • If no VkAllocationCallbacks were provided when device was created, pAllocator must be NULL

Valid Usage (Implicit)

  • If device is not NULL, device must be a valid VkDevice handle
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure

Host Synchronization

  • Host access to device must be externally synchronized

See Also

VkAllocationCallbacks, VkDevice

data VkDeviceQueueCreateInfo Source #

VkDeviceQueueCreateInfo - Structure specifying parameters of a newly created device queue

Valid Usage

  • queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties
  • queueCount must be less than or equal to the queueCount member of the VkQueueFamilyProperties structure, as returned by vkGetPhysicalDeviceQueueFamilyProperties in the pQueueFamilyProperties[queueFamilyIndex]
  • Each element of pQueuePriorities must be between 0.0 and 1.0 inclusive

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO

See Also

VkDeviceCreateInfo, VkDeviceQueueCreateFlags, VkStructureType

Constructors

VkDeviceQueueCreateInfo 

Fields

  • vkSType :: VkStructureType

    sType is the type of this structure.

  • vkPNext :: Ptr ()

    pNext is NULL or a pointer to an extension-specific structure.

  • vkFlags :: VkDeviceQueueCreateFlags

    flags is reserved for future use.

  • vkQueueFamilyIndex :: Word32

    queueFamilyIndex is an unsigned integer indicating the index of the queue family to create on this device. This index corresponds to the index of an element of the pQueueFamilyProperties array that was returned by vkGetPhysicalDeviceQueueFamilyProperties.

  • vkQueueCount :: Word32

    queueCount is an unsigned integer specifying the number of queues to create in the queue family indicated by queueFamilyIndex.

  • vkPQueuePriorities :: Ptr CFloat

    pQueuePriorities is an array of queueCount normalized floating point values, specifying priorities of work that will be submitted to each created queue. See Queue Priority for more information.

data VkDeviceCreateInfo Source #

VkDeviceCreateInfo - Structure specifying parameters of a newly created device

Valid Usage

  • The queueFamilyIndex member of each element of pQueueCreateInfos must be unique within pQueueCreateInfos
  • If the pNext chain includes a VkPhysicalDeviceFeatures2 structure, then pEnabledFeatures must be NULL
  • 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 be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO

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