Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- getImageSparseMemoryRequirements :: forall io. MonadIO io => Device -> Image -> io ("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements)
- getPhysicalDeviceSparseImageFormatProperties :: forall io. MonadIO io => PhysicalDevice -> Format -> ImageType -> ("samples" ::: SampleCountFlagBits) -> ImageUsageFlags -> ImageTiling -> io ("properties" ::: Vector SparseImageFormatProperties)
- queueBindSparse :: forall io. MonadIO io => Queue -> ("bindInfo" ::: Vector (SomeStruct BindSparseInfo)) -> Fence -> io ()
- data SparseImageFormatProperties = SparseImageFormatProperties {}
- data SparseImageMemoryRequirements = SparseImageMemoryRequirements {}
- data ImageSubresource = ImageSubresource {}
- data SparseMemoryBind = SparseMemoryBind {}
- data SparseImageMemoryBind = SparseImageMemoryBind {}
- data SparseBufferMemoryBindInfo = SparseBufferMemoryBindInfo {}
- data SparseImageOpaqueMemoryBindInfo = SparseImageOpaqueMemoryBindInfo {}
- data SparseImageMemoryBindInfo = SparseImageMemoryBindInfo {}
- data BindSparseInfo (es :: [Type]) = BindSparseInfo {}
- newtype ImageAspectFlagBits where
- ImageAspectFlagBits Flags
- pattern IMAGE_ASPECT_COLOR_BIT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_DEPTH_BIT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_STENCIL_BIT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_METADATA_BIT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_NONE :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_PLANE_2_BIT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_PLANE_1_BIT :: ImageAspectFlagBits
- pattern IMAGE_ASPECT_PLANE_0_BIT :: ImageAspectFlagBits
- type ImageAspectFlags = ImageAspectFlagBits
- newtype SparseImageFormatFlagBits where
- type SparseImageFormatFlags = SparseImageFormatFlagBits
- newtype SparseMemoryBindFlagBits where
- type SparseMemoryBindFlags = SparseMemoryBindFlagBits
Documentation
getImageSparseMemoryRequirements Source #
:: forall io. MonadIO io | |
=> Device |
|
-> Image |
|
-> io ("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements) |
vkGetImageSparseMemoryRequirements - Query the memory requirements for a sparse image
Description
If pSparseMemoryRequirements
is NULL
, then the number of sparse
memory requirements available is returned in
pSparseMemoryRequirementCount
. Otherwise,
pSparseMemoryRequirementCount
must point to a variable set by the
user to the number of elements in the pSparseMemoryRequirements
array,
and on return the variable is overwritten with the number of structures
actually written to pSparseMemoryRequirements
. If
pSparseMemoryRequirementCount
is less than the number of sparse memory
requirements available, at most pSparseMemoryRequirementCount
structures will be written.
If the image was not created with
IMAGE_CREATE_SPARSE_RESIDENCY_BIT
then pSparseMemoryRequirementCount
will be set to zero and
pSparseMemoryRequirements
will not be written to.
Note
It is legal for an implementation to report a larger value in
MemoryRequirements
::size
than would
be obtained by adding together memory sizes for all
SparseImageMemoryRequirements
returned by
getImageSparseMemoryRequirements
. This may occur when the
implementation requires unused padding in the address range describing
the resource.
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
image
must be a validImage
handle -
pSparseMemoryRequirementCount
must be a valid pointer to auint32_t
value -
If the value referenced by
pSparseMemoryRequirementCount
is not0
, andpSparseMemoryRequirements
is notNULL
,pSparseMemoryRequirements
must be a valid pointer to an array ofpSparseMemoryRequirementCount
SparseImageMemoryRequirements
structures -
image
must have been created, allocated, or retrieved fromdevice
See Also
VK_VERSION_1_0,
Device
, Image
,
SparseImageMemoryRequirements
getPhysicalDeviceSparseImageFormatProperties Source #
:: forall io. MonadIO io | |
=> PhysicalDevice |
|
-> Format |
|
-> ImageType |
|
-> ("samples" ::: SampleCountFlagBits) |
|
-> ImageUsageFlags |
|
-> ImageTiling |
|
-> io ("properties" ::: Vector SparseImageFormatProperties) |
vkGetPhysicalDeviceSparseImageFormatProperties - Retrieve properties of an image format applied to sparse images
Description
If pProperties
is NULL
, then the number of sparse format properties
available is returned in pPropertyCount
. Otherwise, pPropertyCount
must point to a variable set by the user to the number of elements in
the pProperties
array, and on return the variable is overwritten with
the number of structures actually written to pProperties
. If
pPropertyCount
is less than the number of sparse format properties
available, at most pPropertyCount
structures will be written.
If
IMAGE_CREATE_SPARSE_RESIDENCY_BIT
is not supported for the given arguments, pPropertyCount
will be set
to zero upon return, and no data will be written to pProperties
.
Multiple aspects are returned for depth/stencil images that are
implemented as separate planes by the implementation. The depth and
stencil data planes each have unique SparseImageFormatProperties
data.
Depth/stencil images with depth and stencil data interleaved into a
single plane will return a single SparseImageFormatProperties
structure with the aspectMask
set to
IMAGE_ASPECT_DEPTH_BIT
|
IMAGE_ASPECT_STENCIL_BIT
.
Valid Usage
-
samples
must be a bit value that is set inImageFormatProperties
::sampleCounts
returned bygetPhysicalDeviceImageFormatProperties
withformat
,type
,tiling
, andusage
equal to those in this command andflags
equal to the value that is set inImageCreateInfo
::flags
when the image is created
Valid Usage (Implicit)
-
physicalDevice
must be a validPhysicalDevice
handle
-
format
must be a validFormat
value -
type
must be a validImageType
value -
samples
must be a validSampleCountFlagBits
value -
usage
must be a valid combination ofImageUsageFlagBits
values -
usage
must not be0
-
tiling
must be a validImageTiling
value -
pPropertyCount
must be a valid pointer to auint32_t
value -
If the value referenced by
pPropertyCount
is not0
, andpProperties
is notNULL
,pProperties
must be a valid pointer to an array ofpPropertyCount
SparseImageFormatProperties
structures
See Also
VK_VERSION_1_0,
Format
,
ImageTiling
,
ImageType
,
ImageUsageFlags
,
PhysicalDevice
,
SampleCountFlagBits
,
SparseImageFormatProperties
:: forall io. MonadIO io | |
=> Queue |
|
-> ("bindInfo" ::: Vector (SomeStruct BindSparseInfo)) |
|
-> Fence |
|
-> io () |
vkQueueBindSparse - Bind device memory to a sparse resource object
Description
queueBindSparse
is a
queue submission command,
with each batch defined by an element of pBindInfo
as a
BindSparseInfo
structure. Batches begin execution in the order they
appear in pBindInfo
, but may complete out of order.
Within a batch, a given range of a resource must not be bound more than once. Across batches, if a range is to be bound to one allocation and offset and then to another allocation and offset, then the application must guarantee (usually using semaphores) that the binding operations are executed in the correct order, as well as to order binding operations against the execution of command buffer submissions.
As no operation to queueBindSparse
causes any pipeline stage to access
memory, synchronization primitives used in this command effectively only
define execution dependencies.
Additional information about fence and semaphore operation is described in the synchronization chapter.
Valid Usage
- If
fence
is notNULL_HANDLE
,fence
must be unsignaled
- If
fence
is notNULL_HANDLE
,fence
must not be associated with any other queue command that has not yet completed execution on that queue - Each element of the
pSignalSemaphores
member of each element ofpBindInfo
must be unsignaled when the semaphore signal operation it defines is executed on the device - When a semaphore wait
operation referring to a binary semaphore defined by any element of
the
pWaitSemaphores
member of any element ofpBindInfo
executes onqueue
, there must be no other queues waiting on the same semaphore - All elements of the
pWaitSemaphores
member of all elements ofpBindInfo
created with aSemaphoreType
ofSEMAPHORE_TYPE_BINARY
must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution
Valid Usage (Implicit)
-
queue
must be a validQueue
handle
- If
bindInfoCount
is not0
,pBindInfo
must be a valid pointer to an array ofbindInfoCount
validBindSparseInfo
structures - If
fence
is notNULL_HANDLE
,fence
must be a validFence
handle - The
queue
must support sparse binding operations - Both of
fence
, andqueue
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
queue
must be externally synchronized
- Host access to
fence
must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
---|---|---|---|---|
- | - | - | SPARSE_BINDING | - |
Return Codes
See Also
data SparseImageFormatProperties Source #
VkSparseImageFormatProperties - Structure specifying sparse image format properties
See Also
VK_VERSION_1_0,
Extent3D
,
ImageAspectFlags
,
SparseImageFormatFlags
,
SparseImageFormatProperties2
,
SparseImageMemoryRequirements
,
getPhysicalDeviceSparseImageFormatProperties
SparseImageFormatProperties | |
|
Instances
data SparseImageMemoryRequirements Source #
VkSparseImageMemoryRequirements - Structure specifying sparse image memory requirements
See Also
VK_VERSION_1_0,
DeviceSize
,
SparseImageFormatProperties
,
SparseImageMemoryRequirements2
,
getImageSparseMemoryRequirements
SparseImageMemoryRequirements | |
|
Instances
data ImageSubresource Source #
VkImageSubresource - Structure specifying an image subresource
Valid Usage (Implicit)
See Also
VK_VERSION_1_0,
ImageAspectFlags
,
ImageSubresource2KHR
,
SparseImageMemoryBind
, getImageSubresourceLayout
ImageSubresource | |
|
Instances
data SparseMemoryBind Source #
VkSparseMemoryBind - Structure specifying a sparse memory bind operation
Description
The binding range [resourceOffset
, resourceOffset
+ size
) has
different constraints based on flags
. If flags
contains
SPARSE_MEMORY_BIND_METADATA_BIT
,
the binding range must be within the mip tail region of the metadata
aspect. This metadata region is defined by:
- metadataRegion = [base, base +
imageMipTailSize
) - base =
imageMipTailOffset
+imageMipTailStride
× n
and imageMipTailOffset
, imageMipTailSize
, and imageMipTailStride
values are from the SparseImageMemoryRequirements
corresponding to the
metadata aspect of the image, and n is a valid array layer index for the
image,
imageMipTailStride
is considered to be zero for aspects where
SparseImageMemoryRequirements
::formatProperties.flags
contains
SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT
.
If flags
does not contain
SPARSE_MEMORY_BIND_METADATA_BIT
,
the binding range must be within the range
[0,MemoryRequirements
::size
).
Valid Usage
- If
memory
is notNULL_HANDLE
,memory
andmemoryOffset
must match the memory requirements of the resource, as described in section https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#resources-association
- If
memory
is notNULL_HANDLE
,memory
must not have been created with a memory type that reportsMEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
bit set -
size
must be greater than0
-
resourceOffset
must be less than the size of the resource -
size
must be less than or equal to the size of the resource minusresourceOffset
-
memoryOffset
must be less than the size ofmemory
-
size
must be less than or equal to the size ofmemory
minusmemoryOffset
- If
memory
was created withExportMemoryAllocateInfo
::handleTypes
not equal to0
, at least one handle type it contained must also have been set inExternalMemoryBufferCreateInfo
::handleTypes
orExternalMemoryImageCreateInfo
::handleTypes
when the resource was created - If
memory
was created by a memory import operation, the external handle type of the imported memory must also have been set inExternalMemoryBufferCreateInfo
::handleTypes
orExternalMemoryImageCreateInfo
::handleTypes
when the resource was created
Valid Usage (Implicit)
- If
memory
is notNULL_HANDLE
,memory
must be a validDeviceMemory
handle
-
flags
must be a valid combination ofSparseMemoryBindFlagBits
values
See Also
VK_VERSION_1_0,
DeviceMemory
,
DeviceSize
,
SparseBufferMemoryBindInfo
, SparseImageOpaqueMemoryBindInfo
,
SparseMemoryBindFlags
SparseMemoryBind | |
|
Instances
data SparseImageMemoryBind Source #
VkSparseImageMemoryBind - Structure specifying sparse image memory bind
Valid Usage
- If the
sparseResidencyAliased
feature is not enabled, and if any other resources are bound to
ranges of
memory
, the range ofmemory
being bound must not overlap with those bound ranges
-
memory
andmemoryOffset
must match the memory requirements of the calling command’simage
, as described in section https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#resources-association -
subresource
must be a valid image subresource forimage
(see https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#resources-image-views) -
offset.x
must be a multiple of the sparse image block width (SparseImageFormatProperties
::imageGranularity.width
) of the image -
extent.width
must be greater than0
-
extent.width
must either be a multiple of the sparse image block width of the image, or else (extent.width
+offset.x
) must equal the width of the image subresource -
offset.y
must be a multiple of the sparse image block height (SparseImageFormatProperties
::imageGranularity.height
) of the image -
extent.height
must be greater than0
-
extent.height
must either be a multiple of the sparse image block height of the image, or else (extent.height
+offset.y
) must equal the height of the image subresource -
offset.z
must be a multiple of the sparse image block depth (SparseImageFormatProperties
::imageGranularity.depth
) of the image -
extent.depth
must be greater than0
-
extent.depth
must either be a multiple of the sparse image block depth of the image, or else (extent.depth
+offset.z
) must equal the depth of the image subresource - If
memory
was created withExportMemoryAllocateInfo
::handleTypes
not equal to0
, at least one handle type it contained must also have been set inExternalMemoryImageCreateInfo
::handleTypes
when the image was created - If
memory
was created by a memory import operation, the external handle type of the imported memory must also have been set inExternalMemoryImageCreateInfo
::handleTypes
whenimage
was created
Valid Usage (Implicit)
-
subresource
must be a validImageSubresource
structure
- If
memory
is notNULL_HANDLE
,memory
must be a validDeviceMemory
handle -
flags
must be a valid combination ofSparseMemoryBindFlagBits
values
See Also
VK_VERSION_1_0,
DeviceMemory
,
DeviceSize
,
Extent3D
, ImageSubresource
,
Offset3D
, SparseImageMemoryBindInfo
,
SparseMemoryBindFlags
SparseImageMemoryBind | |
|
Instances
data SparseBufferMemoryBindInfo Source #
VkSparseBufferMemoryBindInfo - Structure specifying a sparse buffer memory bind operation
Valid Usage (Implicit)
See Also
SparseBufferMemoryBindInfo | |
|
Instances
Show SparseBufferMemoryBindInfo Source # | |
Defined in Vulkan.Core10.SparseResourceMemoryManagement showsPrec :: Int -> SparseBufferMemoryBindInfo -> ShowS # show :: SparseBufferMemoryBindInfo -> String # showList :: [SparseBufferMemoryBindInfo] -> ShowS # | |
FromCStruct SparseBufferMemoryBindInfo Source # | |
ToCStruct SparseBufferMemoryBindInfo Source # | |
Defined in Vulkan.Core10.SparseResourceMemoryManagement withCStruct :: SparseBufferMemoryBindInfo -> (Ptr SparseBufferMemoryBindInfo -> IO b) -> IO b Source # pokeCStruct :: Ptr SparseBufferMemoryBindInfo -> SparseBufferMemoryBindInfo -> IO b -> IO b Source # withZeroCStruct :: (Ptr SparseBufferMemoryBindInfo -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr SparseBufferMemoryBindInfo -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero SparseBufferMemoryBindInfo Source # | |
data SparseImageOpaqueMemoryBindInfo Source #
VkSparseImageOpaqueMemoryBindInfo - Structure specifying sparse image opaque memory bind information
Valid Usage
- If the
flags
member of any element ofpBinds
containsSPARSE_MEMORY_BIND_METADATA_BIT
, the binding range defined must be within the mip tail region of the metadata aspect ofimage
Valid Usage (Implicit)
-
image
must be a validImage
handle
-
pBinds
must be a valid pointer to an array ofbindCount
validSparseMemoryBind
structures -
bindCount
must be greater than0
See Also
SparseImageOpaqueMemoryBindInfo | |
|
Instances
data SparseImageMemoryBindInfo Source #
VkSparseImageMemoryBindInfo - Structure specifying sparse image memory bind information
Valid Usage
- The
subresource.mipLevel
member of each element ofpBinds
must be less than themipLevels
specified inImageCreateInfo
whenimage
was created
- The
subresource.arrayLayer
member of each element ofpBinds
must be less than thearrayLayers
specified inImageCreateInfo
whenimage
was created -
image
must have been created withIMAGE_CREATE_SPARSE_RESIDENCY_BIT
set
Valid Usage (Implicit)
-
image
must be a validImage
handle
-
pBinds
must be a valid pointer to an array ofbindCount
validSparseImageMemoryBind
structures -
bindCount
must be greater than0
See Also
VK_VERSION_1_0,
BindSparseInfo
, Image
, SparseImageMemoryBind
SparseImageMemoryBindInfo | |
|
Instances
Show SparseImageMemoryBindInfo Source # | |
Defined in Vulkan.Core10.SparseResourceMemoryManagement showsPrec :: Int -> SparseImageMemoryBindInfo -> ShowS # show :: SparseImageMemoryBindInfo -> String # showList :: [SparseImageMemoryBindInfo] -> ShowS # | |
FromCStruct SparseImageMemoryBindInfo Source # | |
ToCStruct SparseImageMemoryBindInfo Source # | |
Defined in Vulkan.Core10.SparseResourceMemoryManagement withCStruct :: SparseImageMemoryBindInfo -> (Ptr SparseImageMemoryBindInfo -> IO b) -> IO b Source # pokeCStruct :: Ptr SparseImageMemoryBindInfo -> SparseImageMemoryBindInfo -> IO b -> IO b Source # withZeroCStruct :: (Ptr SparseImageMemoryBindInfo -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr SparseImageMemoryBindInfo -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero SparseImageMemoryBindInfo Source # | |
data BindSparseInfo (es :: [Type]) Source #
VkBindSparseInfo - Structure specifying a sparse binding operation
Valid Usage
- If any element of
pWaitSemaphores
orpSignalSemaphores
was created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
then thepNext
chain must include aTimelineSemaphoreSubmitInfo
structure
- If the
pNext
chain of this structure includes aTimelineSemaphoreSubmitInfo
structure and any element ofpWaitSemaphores
was created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
then itswaitSemaphoreValueCount
member must equalwaitSemaphoreCount
- If the
pNext
chain of this structure includes aTimelineSemaphoreSubmitInfo
structure and any element ofpSignalSemaphores
was created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
then itssignalSemaphoreValueCount
member must equalsignalSemaphoreCount
- For each element of
pSignalSemaphores
created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
the corresponding element ofTimelineSemaphoreSubmitInfo
::pSignalSemaphoreValues
must have a value greater than the current value of the semaphore when the semaphore signal operation is executed - For each element of
pWaitSemaphores
created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
the corresponding element ofTimelineSemaphoreSubmitInfo
::pWaitSemaphoreValues
must have a value which does not differ from the current value of the semaphore or from the value of any outstanding semaphore wait or signal operation on that semaphore by more than maxTimelineSemaphoreValueDifference - For each element of
pSignalSemaphores
created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
the corresponding element ofTimelineSemaphoreSubmitInfo
::pSignalSemaphoreValues
must have a value which does not differ from the current value of the semaphore or from the value of any outstanding semaphore wait or signal operation on that semaphore by more than maxTimelineSemaphoreValueDifference
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_BIND_SPARSE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofDeviceGroupBindSparseInfo
,FrameBoundaryEXT
, orTimelineSemaphoreSubmitInfo
- The
sType
value of each struct in thepNext
chain must be unique - If
waitSemaphoreCount
is not0
,pWaitSemaphores
must be a valid pointer to an array ofwaitSemaphoreCount
validSemaphore
handles - If
bufferBindCount
is not0
,pBufferBinds
must be a valid pointer to an array ofbufferBindCount
validSparseBufferMemoryBindInfo
structures - If
imageOpaqueBindCount
is not0
,pImageOpaqueBinds
must be a valid pointer to an array ofimageOpaqueBindCount
validSparseImageOpaqueMemoryBindInfo
structures - If
imageBindCount
is not0
,pImageBinds
must be a valid pointer to an array ofimageBindCount
validSparseImageMemoryBindInfo
structures - If
signalSemaphoreCount
is not0
,pSignalSemaphores
must be a valid pointer to an array ofsignalSemaphoreCount
validSemaphore
handles - Both of the elements of
pSignalSemaphores
, and the elements ofpWaitSemaphores
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
VK_VERSION_1_0,
Semaphore
, SparseBufferMemoryBindInfo
,
SparseImageMemoryBindInfo
, SparseImageOpaqueMemoryBindInfo
,
StructureType
, queueBindSparse
BindSparseInfo | |
|
Instances
newtype ImageAspectFlagBits Source #
VkImageAspectFlagBits - Bitmask specifying which aspects of an image are included in a view
See Also
VK_VERSION_1_0,
BindImagePlaneMemoryInfo
,
DeviceImageMemoryRequirements
,
ExportMetalTextureInfoEXT
,
ImageAspectFlags
,
ImagePlaneMemoryRequirementsInfo
,
ImportMetalTextureInfoEXT
Instances
newtype SparseImageFormatFlagBits Source #
VkSparseImageFormatFlagBits - Bitmask specifying additional information about a sparse image resource
See Also
pattern SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT :: SparseImageFormatFlagBits |
|
pattern SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT :: SparseImageFormatFlagBits |
|
pattern SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT :: SparseImageFormatFlagBits |
|
Instances
newtype SparseMemoryBindFlagBits Source #
VkSparseMemoryBindFlagBits - Bitmask specifying usage of a sparse memory binding operation
See Also
pattern SPARSE_MEMORY_BIND_METADATA_BIT :: SparseMemoryBindFlagBits |
|