| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.Device
Synopsis
- createDevice :: forall a io. (Extendss DeviceCreateInfo a, PokeChain a, MonadIO io) => PhysicalDevice -> DeviceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Device
- withDevice :: forall a io r. (Extendss DeviceCreateInfo a, PokeChain a, MonadIO io) => PhysicalDevice -> DeviceCreateInfo a -> Maybe AllocationCallbacks -> (io Device -> (Device -> io ()) -> r) -> r
- destroyDevice :: forall io. MonadIO io => Device -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- data DeviceQueueCreateInfo (es :: [Type]) = DeviceQueueCreateInfo {}
- data DeviceCreateInfo (es :: [Type]) = DeviceCreateInfo {}
- data Device = Device {}
- newtype DeviceCreateFlags = DeviceCreateFlags Flags
- newtype DeviceQueueCreateFlagBits where
- type DeviceQueueCreateFlags = DeviceQueueCreateFlagBits
Documentation
Arguments
| :: forall a io. (Extendss DeviceCreateInfo a, PokeChain a, MonadIO io) | |
| => PhysicalDevice |
|
| -> DeviceCreateInfo a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io Device |
vkCreateDevice - Create a new device instance
Description
createDevice 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, createDevice must return
ERROR_EXTENSION_NOT_PRESENT. If any
requested feature is not supported, createDevice must return
ERROR_FEATURE_NOT_PRESENT. Support for
extensions can be checked before creating a device by querying
enumerateDeviceExtensionProperties.
Support for features can similarly be checked by querying
getPhysicalDeviceFeatures.
After verifying and enabling the extensions the
Device object is created and returned to the
application.
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,
createDevice will return
ERROR_TOO_MANY_OBJECTS.
Valid Usage
- All
required extensions
for each extension in the
DeviceCreateInfo::ppEnabledExtensionNameslist must also be present in that list
Valid Usage (Implicit)
physicalDevicemust be a validPhysicalDevicehandle
pCreateInfomust be a valid pointer to a validDeviceCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure pDevicemust be a valid pointer to aDevicehandle
Return Codes
See Also
AllocationCallbacks,
Device, DeviceCreateInfo,
PhysicalDevice
withDevice :: forall a io r. (Extendss DeviceCreateInfo a, PokeChain a, MonadIO io) => PhysicalDevice -> DeviceCreateInfo a -> Maybe AllocationCallbacks -> (io Device -> (Device -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createDevice and destroyDevice
To ensure that destroyDevice is always called: pass
bracket (or the allocate function from your
favourite resource management library) as the first argument.
To just extract the pair pass (,) as the first argument.
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyDevice - Destroy a logical device
Description
To ensure that no work is active on the device,
deviceWaitIdle 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
Device object. Therefore, to avoid resource
leaks, it is critical that an application explicitly free all of these
resources prior to calling destroyDevice.
Valid Usage
- All child objects created on
devicemust have been destroyed prior to destroyingdevice
- If
AllocationCallbackswere provided whendevicewas created, a compatible set of callbacks must be provided here - If no
AllocationCallbackswere provided whendevicewas created,pAllocatormust beNULL
Valid Usage (Implicit)
- If
deviceis notNULL,devicemust be a validDevicehandle
- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure
Host Synchronization
- Host access to
devicemust be externally synchronized
- Host access to all
Queueobjects received fromdevicemust be externally synchronized
See Also
data DeviceQueueCreateInfo (es :: [Type]) Source #
VkDeviceQueueCreateInfo - Structure specifying parameters of a newly created device queue
Valid Usage
queueFamilyIndexmust be less thanpQueueFamilyPropertyCountreturned bygetPhysicalDeviceQueueFamilyProperties
queueCountmust be less than or equal to thequeueCountmember of theQueueFamilyPropertiesstructure, as returned bygetPhysicalDeviceQueueFamilyPropertiesin thepQueueFamilyProperties[queueFamilyIndex]- Each element of
pQueuePrioritiesmust be between0.0and1.0inclusive - If the
protected memory
feature is not enabled, the
DEVICE_QUEUE_CREATE_PROTECTED_BITbit offlagsmust not be set
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
pNextmust beNULLor a pointer to a valid instance ofDeviceQueueGlobalPriorityCreateInfoEXT- The
sTypevalue of each struct in thepNextchain must be unique flagsmust be a valid combination ofDeviceQueueCreateFlagBitsvaluespQueuePrioritiesmust be a valid pointer to an array ofqueueCountfloatvaluesqueueCountmust be greater than0
See Also
Constructors
| DeviceQueueCreateInfo | |
Fields
| |
Instances
data DeviceCreateInfo (es :: [Type]) Source #
VkDeviceCreateInfo - Structure specifying parameters of a newly created device
Valid Usage
- The
queueFamilyIndexmember of each element ofpQueueCreateInfosmust be unique withinpQueueCreateInfos, except that two members can share the samequeueFamilyIndexif one is a protected-capable queue and one is not a protected-capable queue
- If the
pNextchain includes aPhysicalDeviceFeatures2structure, thenpEnabledFeaturesmust beNULL ppEnabledExtensionNamesmust not containVK_AMD_negative_viewport_heightppEnabledExtensionNamesmust not contain bothVK_KHR_buffer_device_addressandVK_EXT_buffer_device_address- If the
pNextchain includes aPhysicalDeviceVulkan11Featuresstructure, then it must not include aPhysicalDevice16BitStorageFeatures,PhysicalDeviceMultiviewFeatures,PhysicalDeviceVariablePointersFeatures,PhysicalDeviceProtectedMemoryFeatures,PhysicalDeviceSamplerYcbcrConversionFeatures, orPhysicalDeviceShaderDrawParametersFeaturesstructure - If the
pNextchain includes aPhysicalDeviceVulkan12Featuresstructure, then it must not include aPhysicalDevice8BitStorageFeatures,PhysicalDeviceShaderAtomicInt64Features,PhysicalDeviceShaderFloat16Int8Features,PhysicalDeviceDescriptorIndexingFeatures,PhysicalDeviceScalarBlockLayoutFeatures,PhysicalDeviceImagelessFramebufferFeatures,PhysicalDeviceUniformBufferStandardLayoutFeatures,PhysicalDeviceShaderSubgroupExtendedTypesFeatures,PhysicalDeviceSeparateDepthStencilLayoutsFeatures,PhysicalDeviceHostQueryResetFeatures,PhysicalDeviceTimelineSemaphoreFeatures,PhysicalDeviceBufferDeviceAddressFeatures, orPhysicalDeviceVulkanMemoryModelFeaturesstructure - If
ppEnabledExtensionscontains"VK_KHR_shader_draw_parameters"and thepNextchain includes aPhysicalDeviceVulkan11Featuresstructure, thenPhysicalDeviceVulkan11Features::shaderDrawParametersmust beTRUE - If
ppEnabledExtensionscontains"VK_KHR_draw_indirect_count"and thepNextchain includes aPhysicalDeviceVulkan12Featuresstructure, thenPhysicalDeviceVulkan12Features::drawIndirectCountmust beTRUE - If
ppEnabledExtensionscontains"VK_KHR_sampler_mirror_clamp_to_edge"and thepNextchain includes aPhysicalDeviceVulkan12Featuresstructure, thenPhysicalDeviceVulkan12Features::samplerMirrorClampToEdgemust beTRUE - If
ppEnabledExtensionscontains"VK_EXT_descriptor_indexing"and thepNextchain includes aPhysicalDeviceVulkan12Featuresstructure, thenPhysicalDeviceVulkan12Features::descriptorIndexingmust beTRUE - If
ppEnabledExtensionscontains"VK_EXT_sampler_filter_minmax"and thepNextchain includes aPhysicalDeviceVulkan12Featuresstructure, thenPhysicalDeviceVulkan12Features::samplerFilterMinmaxmust beTRUE - If
ppEnabledExtensionscontains"VK_EXT_shader_viewport_index_layer"and thepNextchain includes aPhysicalDeviceVulkan12Featuresstructure, thenPhysicalDeviceVulkan12Features::shaderOutputViewportIndexandPhysicalDeviceVulkan12Features::shaderOutputLayermust both beTRUE - If the
VK_KHR_portability_subsetextension is included inpPropertiesofenumerateDeviceExtensionProperties,ppEnabledExtensionsmust include "VK_KHR_portability_subset". - If shadingRateImage is enabled, pipelineFragmentShadingRate must not be enabled
- If shadingRateImage is enabled, primitiveFragmentShadingRate must not be enabled
- If shadingRateImage is enabled, attachmentFragmentShadingRate must not be enabled
- If fragmentDensityMap is enabled, pipelineFragmentShadingRate must not be enabled
- If fragmentDensityMap is enabled, primitiveFragmentShadingRate must not be enabled
- If fragmentDensityMap is enabled, attachmentFragmentShadingRate must not be enabled
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_DEVICE_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofDeviceDeviceMemoryReportCreateInfoEXT,DeviceDiagnosticsConfigCreateInfoNV,DeviceGroupDeviceCreateInfo,DeviceMemoryOverallocationCreateInfoAMD,DevicePrivateDataCreateInfoEXT,PhysicalDevice16BitStorageFeatures,PhysicalDevice4444FormatsFeaturesEXT,PhysicalDevice8BitStorageFeatures,PhysicalDeviceASTCDecodeFeaturesEXT,PhysicalDeviceBlendOperationAdvancedFeaturesEXT,PhysicalDeviceBufferDeviceAddressFeatures,PhysicalDeviceBufferDeviceAddressFeaturesEXT,PhysicalDeviceCoherentMemoryFeaturesAMD,PhysicalDeviceComputeShaderDerivativesFeaturesNV,PhysicalDeviceConditionalRenderingFeaturesEXT,PhysicalDeviceCooperativeMatrixFeaturesNV,PhysicalDeviceCornerSampledImageFeaturesNV,PhysicalDeviceCoverageReductionModeFeaturesNV,PhysicalDeviceCustomBorderColorFeaturesEXT,PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV,PhysicalDeviceDepthClipEnableFeaturesEXT,PhysicalDeviceDescriptorIndexingFeatures,PhysicalDeviceDeviceGeneratedCommandsFeaturesNV,PhysicalDeviceDeviceMemoryReportFeaturesEXT,PhysicalDeviceDiagnosticsConfigFeaturesNV,PhysicalDeviceExclusiveScissorFeaturesNV,PhysicalDeviceExtendedDynamicStateFeaturesEXT,PhysicalDeviceFeatures2,PhysicalDeviceFragmentDensityMap2FeaturesEXT,PhysicalDeviceFragmentDensityMapFeaturesEXT,PhysicalDeviceFragmentShaderBarycentricFeaturesNV,PhysicalDeviceFragmentShaderInterlockFeaturesEXT,PhysicalDeviceFragmentShadingRateFeaturesKHR,PhysicalDeviceHostQueryResetFeatures,PhysicalDeviceImageRobustnessFeaturesEXT,PhysicalDeviceImagelessFramebufferFeatures,PhysicalDeviceIndexTypeUint8FeaturesEXT,PhysicalDeviceInlineUniformBlockFeaturesEXT,PhysicalDeviceLineRasterizationFeaturesEXT,PhysicalDeviceMemoryPriorityFeaturesEXT,PhysicalDeviceMeshShaderFeaturesNV,PhysicalDeviceMultiviewFeatures,PhysicalDevicePerformanceQueryFeaturesKHR,PhysicalDevicePipelineCreationCacheControlFeaturesEXT,PhysicalDevicePipelineExecutablePropertiesFeaturesKHR,PhysicalDevicePortabilitySubsetFeaturesKHR,PhysicalDevicePrivateDataFeaturesEXT,PhysicalDeviceProtectedMemoryFeatures,PhysicalDeviceRayTracingFeaturesKHR,PhysicalDeviceRepresentativeFragmentTestFeaturesNV,PhysicalDeviceRobustness2FeaturesEXT,PhysicalDeviceSamplerYcbcrConversionFeatures,PhysicalDeviceScalarBlockLayoutFeatures,PhysicalDeviceSeparateDepthStencilLayoutsFeatures,PhysicalDeviceShaderAtomicFloatFeaturesEXT,PhysicalDeviceShaderAtomicInt64Features,PhysicalDeviceShaderClockFeaturesKHR,PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT,PhysicalDeviceShaderDrawParametersFeatures,PhysicalDeviceShaderFloat16Int8Features,PhysicalDeviceShaderImageAtomicInt64FeaturesEXT,PhysicalDeviceShaderImageFootprintFeaturesNV,PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL,PhysicalDeviceShaderSMBuiltinsFeaturesNV,PhysicalDeviceShaderSubgroupExtendedTypesFeatures,PhysicalDeviceShaderTerminateInvocationFeaturesKHR,PhysicalDeviceShadingRateImageFeaturesNV,PhysicalDeviceSubgroupSizeControlFeaturesEXT,PhysicalDeviceTexelBufferAlignmentFeaturesEXT,PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT,PhysicalDeviceTimelineSemaphoreFeatures,PhysicalDeviceTransformFeedbackFeaturesEXT,PhysicalDeviceUniformBufferStandardLayoutFeatures,PhysicalDeviceVariablePointersFeatures,PhysicalDeviceVertexAttributeDivisorFeaturesEXT,PhysicalDeviceVulkan11Features,PhysicalDeviceVulkan12Features,PhysicalDeviceVulkanMemoryModelFeatures, orPhysicalDeviceYcbcrImageArraysFeaturesEXT - The
sTypevalue of each struct in thepNextchain must be unique, with the exception of structures of typeDeviceDeviceMemoryReportCreateInfoEXTorDevicePrivateDataCreateInfoEXT flagsmust be0pQueueCreateInfosmust be a valid pointer to an array ofqueueCreateInfoCountvalidDeviceQueueCreateInfostructures- 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 validPhysicalDeviceFeaturesstructure queueCreateInfoCountmust be greater than0
See Also
DeviceCreateFlags,
DeviceQueueCreateInfo,
PhysicalDeviceFeatures,
StructureType, createDevice
Constructors
| DeviceCreateInfo | |
Fields
| |
Instances
VkDevice - Opaque handle to a device object
See Also
acquireFullScreenExclusiveModeEXT,
acquireNextImage2KHR,
acquireNextImageKHR,
acquirePerformanceConfigurationINTEL,
acquireProfilingLockKHR,
allocateCommandBuffers,
allocateDescriptorSets,
allocateMemory,
bindAccelerationStructureMemoryKHR,
bindAccelerationStructureMemoryNV,
bindBufferMemory,
bindBufferMemory2,
bindBufferMemory2KHR,
bindImageMemory,
bindImageMemory2,
bindImageMemory2KHR,
buildAccelerationStructureKHR,
compileDeferredNV,
copyAccelerationStructureKHR,
copyAccelerationStructureToMemoryKHR,
copyMemoryToAccelerationStructureKHR,
createAccelerationStructureKHR,
createAccelerationStructureNV,
createBuffer,
createBufferView,
createCommandPool,
createComputePipelines,
createDeferredOperationKHR,
createDescriptorPool,
createDescriptorSetLayout,
createDescriptorUpdateTemplate,
createDescriptorUpdateTemplateKHR,
createDevice, createEvent,
createFence,
createFramebuffer,
createGraphicsPipelines,
createImage,
createImageView,
createIndirectCommandsLayoutNV,
createPipelineCache,
createPipelineLayout,
createPrivateDataSlotEXT,
createQueryPool,
createRayTracingPipelinesKHR,
createRayTracingPipelinesNV,
createRenderPass,
createRenderPass2,
createRenderPass2KHR,
createSampler,
createSamplerYcbcrConversion,
createSamplerYcbcrConversionKHR,
createSemaphore,
createShaderModule,
createSharedSwapchainsKHR,
createSwapchainKHR,
createValidationCacheEXT,
debugMarkerSetObjectNameEXT,
debugMarkerSetObjectTagEXT,
deferredOperationJoinKHR,
destroyAccelerationStructureKHR,
destroyAccelerationStructureNV,
destroyBuffer,
destroyBufferView,
destroyCommandPool,
destroyDeferredOperationKHR,
destroyDescriptorPool,
destroyDescriptorSetLayout,
destroyDescriptorUpdateTemplate,
destroyDescriptorUpdateTemplateKHR,
destroyDevice,
destroyEvent, destroyFence,
destroyFramebuffer,
destroyImage,
destroyImageView,
destroyIndirectCommandsLayoutNV,
destroyPipeline,
destroyPipelineCache,
destroyPipelineLayout,
destroyPrivateDataSlotEXT,
destroyQueryPool,
destroyRenderPass,
destroySampler,
destroySamplerYcbcrConversion,
destroySamplerYcbcrConversionKHR,
destroySemaphore,
destroyShaderModule,
destroySwapchainKHR,
destroyValidationCacheEXT,
deviceWaitIdle,
displayPowerControlEXT,
flushMappedMemoryRanges,
freeCommandBuffers,
freeDescriptorSets,
freeMemory,
getAccelerationStructureDeviceAddressKHR,
getAccelerationStructureHandleNV,
getAccelerationStructureMemoryRequirementsKHR,
getAccelerationStructureMemoryRequirementsNV,
getAndroidHardwareBufferPropertiesANDROID,
getBufferDeviceAddress,
getBufferDeviceAddressEXT,
getBufferDeviceAddressKHR,
getBufferMemoryRequirements,
getBufferMemoryRequirements2,
getBufferMemoryRequirements2KHR,
getBufferOpaqueCaptureAddress,
getBufferOpaqueCaptureAddressKHR,
getCalibratedTimestampsEXT,
getDeferredOperationMaxConcurrencyKHR,
getDeferredOperationResultKHR,
getDescriptorSetLayoutSupport,
getDescriptorSetLayoutSupportKHR,
getDeviceAccelerationStructureCompatibilityKHR,
getDeviceGroupPeerMemoryFeatures,
getDeviceGroupPeerMemoryFeaturesKHR,
getDeviceGroupPresentCapabilitiesKHR,
getDeviceGroupSurfacePresentModes2EXT,
getDeviceGroupSurfacePresentModesKHR,
getDeviceMemoryCommitment,
getDeviceMemoryOpaqueCaptureAddress,
getDeviceMemoryOpaqueCaptureAddressKHR,
getDeviceProcAddr,
getDeviceQueue,
getDeviceQueue2,
getEventStatus,
getFenceFdKHR,
getFenceStatus,
getFenceWin32HandleKHR,
getGeneratedCommandsMemoryRequirementsNV,
getImageDrmFormatModifierPropertiesEXT,
getImageMemoryRequirements,
getImageMemoryRequirements2,
getImageMemoryRequirements2KHR,
getImageSparseMemoryRequirements,
getImageSparseMemoryRequirements2,
getImageSparseMemoryRequirements2KHR,
getImageSubresourceLayout,
getImageViewAddressNVX,
getImageViewHandleNVX,
getMemoryAndroidHardwareBufferANDROID,
getMemoryFdKHR,
getMemoryFdPropertiesKHR,
getMemoryHostPointerPropertiesEXT,
getMemoryWin32HandleKHR,
getMemoryWin32HandleNV,
getMemoryWin32HandlePropertiesKHR,
getPastPresentationTimingGOOGLE,
getPerformanceParameterINTEL,
getPipelineCacheData,
getPipelineExecutableInternalRepresentationsKHR,
getPipelineExecutablePropertiesKHR,
getPipelineExecutableStatisticsKHR,
getPrivateDataEXT,
getQueryPoolResults,
getRayTracingCaptureReplayShaderGroupHandlesKHR,
getRayTracingShaderGroupHandlesKHR,
getRayTracingShaderGroupHandlesNV,
getRefreshCycleDurationGOOGLE,
getRenderAreaGranularity,
getSemaphoreCounterValue,
getSemaphoreCounterValueKHR,
getSemaphoreFdKHR,
getSemaphoreWin32HandleKHR,
getShaderInfoAMD,
getSwapchainCounterEXT,
getSwapchainImagesKHR,
getSwapchainStatusKHR,
getValidationCacheDataEXT,
importFenceFdKHR,
importFenceWin32HandleKHR,
importSemaphoreFdKHR,
importSemaphoreWin32HandleKHR,
initializePerformanceApiINTEL,
invalidateMappedMemoryRanges,
mapMemory,
mergePipelineCaches,
mergeValidationCachesEXT,
registerDeviceEventEXT,
registerDisplayEventEXT,
releaseFullScreenExclusiveModeEXT,
releasePerformanceConfigurationINTEL,
releaseProfilingLockKHR,
resetCommandPool,
resetDescriptorPool,
resetEvent, resetFences,
resetQueryPool,
resetQueryPoolEXT,
setDebugUtilsObjectNameEXT,
setDebugUtilsObjectTagEXT,
setEvent,
setHdrMetadataEXT,
setLocalDimmingAMD,
setPrivateDataEXT,
signalSemaphore,
signalSemaphoreKHR,
trimCommandPool,
trimCommandPoolKHR,
uninitializePerformanceApiINTEL,
unmapMemory,
updateDescriptorSetWithTemplate,
updateDescriptorSetWithTemplateKHR,
updateDescriptorSets,
waitForFences,
waitSemaphores,
waitSemaphoresKHR,
writeAccelerationStructuresPropertiesKHR
Constructors
| Device | |
Fields | |
Instances
| Eq Device Source # | |
| Show Device Source # | |
| Zero Device Source # | |
Defined in Vulkan.Core10.Handles | |
| HasObjectType Device Source # | |
Defined in Vulkan.Core10.Handles Methods objectTypeAndHandle :: Device -> (ObjectType, Word64) Source # | |
| IsHandle Device Source # | |
Defined in Vulkan.Core10.Handles | |
newtype DeviceCreateFlags Source #
VkDeviceCreateFlags - Reserved for future use
Description
DeviceCreateFlags is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Constructors
| DeviceCreateFlags Flags |
Instances
newtype DeviceQueueCreateFlagBits Source #
VkDeviceQueueCreateFlagBits - Bitmask specifying behavior of the queue
See Also
Constructors
| DeviceQueueCreateFlagBits Flags |
Bundled Patterns
| pattern DEVICE_QUEUE_CREATE_PROTECTED_BIT :: DeviceQueueCreateFlagBits |
|