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 {}
- newtype DeviceMemory = DeviceMemory Word64
Documentation
getBufferMemoryRequirements Source #
:: forall io. MonadIO io | |
=> Device |
|
-> Buffer |
|
-> io MemoryRequirements |
vkGetBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object
Valid Usage
- If
buffer
was created with theEXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
external memory handle type, thenbuffer
must be bound to memory
Valid Usage (Implicit)
device
must be a validDevice
handle
buffer
must be a validBuffer
handlepMemoryRequirements
must be a valid pointer to aMemoryRequirements
structurebuffer
must have been created, allocated, or retrieved fromdevice
See Also
:: forall io. MonadIO io | |
=> Device |
|
-> Buffer |
|
-> DeviceMemory |
|
-> ("memoryOffset" ::: DeviceSize) |
|
-> io () |
vkBindBufferMemory - Bind device memory to a buffer object
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, that is notImportAndroidHardwareBufferInfoANDROID
with a non-NULL
buffer
value, the external handle type of the imported memory must also have been set inExternalMemoryBufferCreateInfo
::handleTypes
whenbuffer
was created - If
memory
was created with theImportAndroidHardwareBufferInfoANDROID
memory import operation with a non-NULL
buffer
value,EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
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 Source #
:: forall io. MonadIO io | |
=> Device |
|
-> Image |
|
-> io MemoryRequirements |
vkGetImageMemoryRequirements - Returns the memory requirements for specified Vulkan object
Valid Usage
image
must not have been created with theIMAGE_CREATE_DISJOINT_BIT
flag set
- If
image
was created with theEXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
external memory handle type, thenimage
must be bound to memory
Valid Usage (Implicit)
device
must be a validDevice
handle
image
must be a validImage
handlepMemoryRequirements
must be a valid pointer to aMemoryRequirements
structureimage
must have been created, allocated, or retrieved fromdevice
See Also
:: forall io. MonadIO io | |
=> Device |
|
-> Image |
|
-> DeviceMemory |
|
-> ("memoryOffset" ::: DeviceSize) |
|
-> io () |
vkBindImageMemory - Bind device memory to an image object
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, that is notImportAndroidHardwareBufferInfoANDROID
with a non-NULL
buffer
value, the external handle type of the imported memory must also have been set inExternalMemoryImageCreateInfo
::handleTypes
whenimage
was created - If
memory
was created with theImportAndroidHardwareBufferInfoANDROID
memory import operation with a non-NULL
buffer
value,EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
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 | |
|
Instances
newtype DeviceMemory Source #
VkDeviceMemory - Opaque handle to a device memory object
See Also
BindAccelerationStructureMemoryInfoKHR
,
BindBufferMemoryInfo
,
BindImageMemoryInfo
,
DeviceMemoryOpaqueCaptureAddressInfo
,
MappedMemoryRange
,
MemoryGetAndroidHardwareBufferInfoANDROID
,
MemoryGetFdInfoKHR
,
MemoryGetWin32HandleInfoKHR
,
SparseImageMemoryBind
,
SparseMemoryBind
,
Win32KeyedMutexAcquireReleaseInfoKHR
,
Win32KeyedMutexAcquireReleaseInfoNV
,
allocateMemory
,
bindBufferMemory
,
bindImageMemory
,
freeMemory
,
getDeviceMemoryCommitment
,
getMemoryWin32HandleNV
,
mapMemory
, unmapMemory