Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getBufferMemoryRequirements :: Device -> Buffer -> IO MemoryRequirements
- bindBufferMemory :: Device -> Buffer -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> IO ()
- getImageMemoryRequirements :: Device -> Image -> IO MemoryRequirements
- bindImageMemory :: Device -> Image -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> IO ()
- data MemoryRequirements = MemoryRequirements {}
Documentation
getBufferMemoryRequirements :: 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 :: 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 with 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Buffer' equal toBuffer
- If the
MemoryAllocateInfo
provided whenmemory
was allocated included aMemoryDedicatedAllocateInfo
structure in itspNext
chain, and 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Buffer' was notNULL_HANDLE
, thenBuffer
must equal 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.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 with 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::'Graphics.Vulkan.Core10.Handles.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)
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 :: 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 :: 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 with 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.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, and 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image' was notNULL_HANDLE
, thenImage
must equal 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.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, and 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image' was notNULL_HANDLE
, thenmemoryOffset
must be zero, andImage
must be either equal to 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.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 with 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::'Graphics.Vulkan.Core10.Handles.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)
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 | |
|