Vulkan-Docs/doc/specs/vulkan/man/vkQueueBindSparse.txt

168 lines
7.3 KiB
Plaintext

vkQueueBindSparse(3)
====================
Name
----
vkQueueBindSparse - Bind device memory to a sparse resource object.
C Specification
---------------
include::../protos/vkQueueBindSparse.txt[]
Parameters
----------
pname:queue::
The queue upon which to perform the operation.
pname:bindInfoCount::
The number of binding operations to perform.
pname:pBindInfo::
A pointer to an array of pname:bindInfoCount data structures describing
the binding operations to perform.
pname:fence::
A handle to a fence object that will be signaled when the binding
operation completes.
Description
-----------
fname:vkQueueBindSparse binds memory to sparse resources. The number of
binding operations to perform is specified in pname:bindInfoCount and
the binding operation takes place on the queue specified in pname:queue.
pname:queue must be the handle to a queue that is a member of a family
that supports the ename:VK_QUEUE_SPARSE_MEMMGR_BIT capability.
pname:pBindInfo is a pointer to an array of pname:bindInfoCount
slink:VkBindSparseInfo structures describing each of the binding operations.
The definition of slink:VkBindSparseInfo is:
include::../structs/VkBindSparseInfo.txt[]
The pname:sType member of slink:VkBindSparseInfo should be
ename:VK_STRUCTURE_TYPE_BIND_SPARSE_INFO. The pname:pNext member is reserved
for use by extensions and should be set to code:NULL.
The pname:waitSemaphoreCount member specifies the number of semaphores
that should be waited on before the binding operation takes place.
pname:pWaitSemaphores is a pointer to an array of basetype:VkSemaphore
objects to wait on. If pname:waitSemaphoreCount is zero then the value
of pname:pWaitSemaphores is ignored and the command will not wait before
performing the bind operations.
The pname:bufferBindCount parameter specifies the number of binding
operations to apply to buffer objects. The pname:pBufferBinds parameter
is a pointer to an array of pname:bufferBindCount slink:VkSparseBufferMemoryBindInfo
structures describing the binding operations for buffers to be performed
by the command. The definition of slink:VkSparseBufferMemoryBindInfo is:
include::../structs/VkSparseBufferMemoryBindInfo.txt[]
The pname:buffer member of slink:VkSparseBufferMemoryBindInfo specifies the
target buffer, pname:bindCount specifies the number of binding operations
to apply to that buffer, and pname:pBinds is a pointer to an array of
slink:VkSparseMemoryBind structures describing the bindings. If
pname:bindCount is zero then the value of pname:pBinds is ignored and no
bindings are performed. The definition of slink:VkSparseMemoryBind is:
include::../structs/VkSparseMemoryBind.txt[]
For each element of the array of slink:VkSparseMemoryBind structures,
pname:resourceOffset and pname:size specify the starting offset
and size of the region in the buffer. Both are specified in bytes.
pname:memoryOffset specifies the offset of the region of the memory
object specified by pname:memory that is to be bound to the specified region
in the buffer object. pname:memoryOffset is also specified in bytes.
pname:resourceOffset, pname:size and pname:memoryOffset must each satisfy
the alignment requirements of the buffer. This is returned in the
ptext:alignment field of the slink:VkMemoryRequirements structure filled by a call to
flink:vkGetBufferMemoryRequirements.
The pname:flags member of the slink:VkSparseMemoryBind structure is a
bitfield comprising members of the elink:VkSparseMemoryBindFlagBits
enumeration, the definition of which is:
include::../enums/VkSparseMemoryBindFlagBits.txt[]
If ename:VK_SPARSE_MEMORY_BIND_REPLICATE_BLOCK_BIT is set, only a single
block of memory is consumed from pname:memory and is replicated throughout
the region of the buffer object specified pname:resourceOffset and
pname:size as many times as neccessary to fill it.
All other bits in pname:flags are reserved and should be set to zero.
The ptext:imageOpaqueBindCount member specifies the number of opaque
image memory binding operations to execute and ptext:pImageOpaqueBinds
is a pointer to an array of ptext:imageOpaqueBindCount
slink:VkSparseImageOpaqueMemoryBindInfo structures describing those
operations. If ptext:imageOpaqueBindCount is zero then the value of
ptext:pImageOpaqueBinds is ignored and no binding operations are performed.
The definition of slink:VkSparseImageOpaqueMemoryBindInfo is:
include::../structs/VkSparseImageOpaqueMemoryBindInfo.txt[]
The pname:image member of the slink:VkSparseImageOpaqueMemoryBindInfo structure
specifies the image that is the target of the binding operation. pname:bindCount
specifies the number of binding operations to be applied to pname:image and
pname:pBinds is a pointer to an array of slink:VkSparseMemoryBind structures
describing those operations. If pname:bindCount is zero then the value of
pname:pBinds is ignored. Opaque memory binding operations are expressed
in terms of byte offsets. The slink:VkSparseMemoryBind structures pointed
to by the pname:pBinds member of slink:VkSparseImageOpaqueMemoryBindInfo
are interpreted as described for buffers above.
The ptext:imageBindCount member of the slink:VkBindSparseInfo specifies the
number of non-opaque image bindings to perform, and the ptext:pImageBinds
member of the structure is a pointer to an array of ptext:imageBindCount
slink:VkSparseImageMemoryBindInfo structures describing those operations.
If ptext:imageBindCount is zero then the value of ptext:pImageBinds is
ignored. The definition of slink:VkSparseImageMemoryBindInfo is:
include::../structs/VkSparseImageMemoryBindInfo.txt[]
Within slink:VkSparseImageMemoryBindInfo, the pname:image member specifies
the image that is to be the target of the binding operation. pname:bindCount
specifies the number of binding operations to execute and pname:pBinds
is a pointer to an array of pname:bindCount slink:VkSparseImageMemoryBind
structes describing those operations. The definition of
slink:VkSparseImageMemoryBind is:
include::../structs/VkSparseImageMemoryBind.txt[]
The pname:subresource member of slink:VkSparseImageMemoryBind specifies the
subresource within the image to bind memory to. The pname:offset and
pname:extent members specify the region within the image subresource
to bind memory to. pname:offset and pname:extent are instances of the
slink:VkOffset3D and slink:VkExtent3D structures, respectively, and are
expressed in texels. The pname:memoryOffset member specifies the offset within
the memory object specified by pname:memory from which to bind memory.
pname:memoryOffset is expressed in bytes. Its value and the values contained
in pname:offset and pname:extent must satisfy device-specific alignment
requirements.
The pname:flags member within slink:VkSparseImageMemoryBind has the same
interpretation as the similarly named member in slink:VkSparseMemoryBind.
The ptext:signalSemaphoreCount parameter specifies the number of semaphores
to signal after the binding operations are complete. ptext:pSignalSemaphores
is a pointer to an array of ptext:signalSemaphoreCount basetype:VkSemaphore
objects to signal at this point. If ptext:signalSemaphoreCount is zero
then the value of ptext:pSignalSemaphores is ignored and no semaphores are
signaled as a result of the operation.
include::../validity/protos/vkQueueBindSparse.txt[]
See Also
--------
flink:vkQueueSubmit,
flink:vkBindBufferMemory,
flink:vkGetBufferMemoryRequirements,
flink:vkGetImageMemoryRequirements,
flink:vkBindImageMemory
include::footer.txt[]