Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getBufferMemoryRequirements :: forall io. MonadIO io => Device -> Buffer -> io MemoryRequirements
- bindBufferMemory :: forall io. MonadIO io => Device -> Buffer -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> io ()
- getImageMemoryRequirements :: forall io. MonadIO io => Device -> Image -> io MemoryRequirements
- bindImageMemory :: forall io. MonadIO io => Device -> Image -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> io ()
- data MemoryRequirements = MemoryRequirements {}
Documentation
getBufferMemoryRequirements :: forall io. MonadIO io => Device -> Buffer -> io MemoryRequirements Source #
vkGetBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object
Parameters
device
is the logical device that owns the buffer.
buffer
is the buffer to query.pMemoryRequirements
is a pointer to aMemoryRequirements
structure in which the memory requirements of the buffer object are returned.
Valid Usage (Implicit)
See Also
bindBufferMemory :: forall io. MonadIO io => Device -> Buffer -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> io () Source #
vkBindBufferMemory - Bind device memory to a buffer object
Parameters
device
is the logical device that owns the buffer and memory.
buffer
is the buffer to be attached to memory.memory
is aDeviceMemory
object describing the device memory to attach.memoryOffset
is the start offset of the region ofmemory
which is to be bound to the buffer. The number of bytes returned in theMemoryRequirements
::size
member inmemory
, starting frommemoryOffset
bytes, will be bound to the specified buffer.
Description
bindBufferMemory
is equivalent to passing the same parameters through
BindBufferMemoryInfo
to
bindBufferMemory2
.
Valid Usage
buffer
must not already be backed by a memory object
buffer
must not have been created with any sparse memory binding flagsmemoryOffset
must be less than the size ofmemory
memory
must have been allocated using one of the memory types allowed in thememoryTypeBits
member of theMemoryRequirements
structure returned from a call togetBufferMemoryRequirements
withbuffer
memoryOffset
must be an integer multiple of thealignment
member of theMemoryRequirements
structure returned from a call togetBufferMemoryRequirements
withbuffer
- The
size
member of theMemoryRequirements
structure returned from a call togetBufferMemoryRequirements
withbuffer
must be less than or equal to the size ofmemory
minusmemoryOffset
- If
buffer
requires a dedicated allocation(as reported bygetBufferMemoryRequirements2
inMemoryDedicatedRequirements
::requiresDedicatedAllocation forbuffer
),memory
must have been created withMemoryDedicatedAllocateInfo
::buffer
equal tobuffer
- If the
MemoryAllocateInfo
provided whenmemory
was allocated included aMemoryDedicatedAllocateInfo
structure in itspNext
chain, andMemoryDedicatedAllocateInfo
::buffer
was notNULL_HANDLE
, thenbuffer
must equalMemoryDedicatedAllocateInfo
::buffer
, andmemoryOffset
must be zero. - If buffer was created with the
BUFFER_CREATE_PROTECTED_BIT
bit set, the buffer must be bound to a memory object allocated with a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT
- If buffer was created with the
BUFFER_CREATE_PROTECTED_BIT
bit not set, the buffer must not be bound to a memory object created with a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT
- If
buffer
was created withDedicatedAllocationBufferCreateInfoNV
::dedicatedAllocation
equal toTRUE
,memory
must have been created withDedicatedAllocationMemoryAllocateInfoNV
::buffer
equal to a buffer handle created with identical creation parameters tobuffer
andmemoryOffset
must be zero - If the value of
ExportMemoryAllocateInfo
::handleTypes
used to allocatememory
is not0
, it must include at least one of the handles set inExternalMemoryBufferCreateInfo
::handleTypes
whenbuffer
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
whenbuffer
was created - If the
PhysicalDeviceBufferDeviceAddressFeatures
::bufferDeviceAddress
feature is enabled andbuffer
was created with theBUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT
bit set,memory
must have been allocated with theMEMORY_ALLOCATE_DEVICE_ADDRESS_BIT
bit set
Valid Usage (Implicit)
device
must be a validDevice
handle
buffer
must be a validBuffer
handlememory
must be a validDeviceMemory
handlebuffer
must have been created, allocated, or retrieved fromdevice
memory
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
buffer
must be externally synchronized
Return Codes
See Also
getImageMemoryRequirements :: forall io. MonadIO io => Device -> Image -> io MemoryRequirements Source #
vkGetImageMemoryRequirements - Returns the memory requirements for specified Vulkan object
Parameters
device
is the logical device that owns the image.
image
is the image to query.pMemoryRequirements
is a pointer to aMemoryRequirements
structure in which the memory requirements of the image object are returned.
Valid Usage (Implicit)
See Also
bindImageMemory :: forall io. MonadIO io => Device -> Image -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> io () Source #
vkBindImageMemory - Bind device memory to an image object
Parameters
device
is the logical device that owns the image and memory.
image
is the image.memory
is theDeviceMemory
object describing the device memory to attach.memoryOffset
is the start offset of the region ofmemory
which is to be bound to the image. The number of bytes returned in theMemoryRequirements
::size
member inmemory
, starting frommemoryOffset
bytes, will be bound to the specified image.
Description
bindImageMemory
is equivalent to passing the same parameters through
BindImageMemoryInfo
to
bindImageMemory2
.
Valid Usage
image
must not have been created with theIMAGE_CREATE_DISJOINT_BIT
set.
image
must not already be backed by a memory objectimage
must not have been created with any sparse memory binding flagsmemoryOffset
must be less than the size ofmemory
memory
must have been allocated using one of the memory types allowed in thememoryTypeBits
member of theMemoryRequirements
structure returned from a call togetImageMemoryRequirements
withimage
memoryOffset
must be an integer multiple of thealignment
member of theMemoryRequirements
structure returned from a call togetImageMemoryRequirements
withimage
- The difference of the size of
memory
andmemoryOffset
must be greater than or equal to thesize
member of theMemoryRequirements
structure returned from a call togetImageMemoryRequirements
with the sameimage
- If
image
requires a dedicated allocation (as reported bygetImageMemoryRequirements2
inMemoryDedicatedRequirements
::requiresDedicatedAllocation forimage
),memory
must have been created withMemoryDedicatedAllocateInfo
::image
equal toimage
- If the
dedicated allocation image aliasing
feature is not enabled, and the
MemoryAllocateInfo
provided whenmemory
was allocated included aMemoryDedicatedAllocateInfo
structure in itspNext
chain, andMemoryDedicatedAllocateInfo
::image
was notNULL_HANDLE
, thenimage
must equalMemoryDedicatedAllocateInfo
::image
andmemoryOffset
must be zero. - If the
dedicated allocation image aliasing
feature is enabled, and the
MemoryAllocateInfo
provided whenmemory
was allocated included aMemoryDedicatedAllocateInfo
structure in itspNext
chain, andMemoryDedicatedAllocateInfo
::image
was notNULL_HANDLE
, thenmemoryOffset
must be zero, andimage
must be either equal toMemoryDedicatedAllocateInfo
::image
or an image that was created using the same parameters inImageCreateInfo
, with the exception thatextent
andarrayLayers
may differ subject to the following restrictions: every dimension in theextent
parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created; and thearrayLayers
parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created. - If image was created with the
IMAGE_CREATE_PROTECTED_BIT
bit set, the image must be bound to a memory object allocated with a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT
- If image was created with the
IMAGE_CREATE_PROTECTED_BIT
bit not set, the image must not be bound to a memory object created with a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT
- If
image
was created withDedicatedAllocationImageCreateInfoNV
::dedicatedAllocation
equal toTRUE
,memory
must have been created withDedicatedAllocationMemoryAllocateInfoNV
::image
equal to an image handle created with identical creation parameters toimage
andmemoryOffset
must be zero - If the value of
ExportMemoryAllocateInfo
::handleTypes
used to allocatememory
is not0
, it must include at least one of the handles set inExternalMemoryImageCreateInfo
::handleTypes
whenimage
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)
device
must be a validDevice
handle
image
must be a validImage
handlememory
must be a validDeviceMemory
handleimage
must have been created, allocated, or retrieved fromdevice
memory
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
image
must be externally synchronized
Return Codes
See Also
data MemoryRequirements Source #
VkMemoryRequirements - Structure specifying memory requirements
See Also
DeviceSize
,
MemoryRequirements2
,
getBufferMemoryRequirements
, getImageMemoryRequirements
MemoryRequirements | |
|