| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.MemoryManagement
- type VkBuffer = Ptr VkBuffer_T
- type VkImage = Ptr VkImage_T
- vkGetBufferMemoryRequirements :: ("device" ::: VkDevice) -> ("buffer" ::: VkBuffer) -> ("pMemoryRequirements" ::: Ptr VkMemoryRequirements) -> IO ()
- vkBindBufferMemory :: ("device" ::: VkDevice) -> ("buffer" ::: VkBuffer) -> ("memory" ::: VkDeviceMemory) -> ("memoryOffset" ::: VkDeviceSize) -> IO VkResult
- vkGetImageMemoryRequirements :: ("device" ::: VkDevice) -> ("image" ::: VkImage) -> ("pMemoryRequirements" ::: Ptr VkMemoryRequirements) -> IO ()
- vkBindImageMemory :: ("device" ::: VkDevice) -> ("image" ::: VkImage) -> ("memory" ::: VkDeviceMemory) -> ("memoryOffset" ::: VkDeviceSize) -> IO VkResult
- data VkMemoryRequirements = VkMemoryRequirements {}
Documentation
type VkBuffer = Ptr VkBuffer_T Source #
VkBuffer - Opaque handle to a buffer object
Description
See Also
VkBindBufferMemoryInfo,
VkBufferMemoryBarrier,
VkBufferMemoryRequirementsInfo2,
VkBufferViewCreateInfo,
VkCmdProcessCommandsInfoNVX,
VkDedicatedAllocationMemoryAllocateInfoNV,
VkDescriptorBufferInfo,
VkIndirectCommandsTokenNVX,
VkMemoryDedicatedAllocateInfo,
VkObjectTableIndexBufferEntryNVX,
VkObjectTableVertexBufferEntryNVX,
VkSparseBufferMemoryBindInfo,
vkBindBufferMemory,
vkCmdBindIndexBuffer,
vkCmdBindVertexBuffers,
vkCmdCopyBuffer,
vkCmdCopyBufferToImage,
vkCmdCopyImageToBuffer,
vkCmdCopyQueryPoolResults,
vkCmdDispatchIndirect,
vkCmdDrawIndexedIndirect,
vkCmdDrawIndexedIndirectCountAMD,
vkCmdDrawIndirect,
vkCmdDrawIndirectCountAMD,
vkCmdFillBuffer,
vkCmdUpdateBuffer,
vkCmdWriteBufferMarkerAMD,
vkCreateBuffer,
vkDestroyBuffer,
vkGetBufferMemoryRequirements
type VkImage = Ptr VkImage_T Source #
VkImage - Opaque handle to a image object
Description
See Also
VkBindImageMemoryInfo,
VkDedicatedAllocationMemoryAllocateInfoNV,
VkImageMemoryBarrier,
VkImageMemoryRequirementsInfo2,
VkImageSparseMemoryRequirementsInfo2,
VkImageViewCreateInfo,
VkMemoryDedicatedAllocateInfo,
VkSparseImageMemoryBindInfo,
VkSparseImageOpaqueMemoryBindInfo,
vkBindImageMemory,
vkCmdBlitImage,
vkCmdClearColorImage,
vkCmdClearDepthStencilImage,
vkCmdCopyBufferToImage,
vkCmdCopyImage,
vkCmdCopyImageToBuffer,
vkCmdResolveImage,
vkCreateImage,
vkDestroyImage,
vkGetImageMemoryRequirements,
vkGetImageSparseMemoryRequirements,
vkGetImageSubresourceLayout,
vkGetSwapchainImagesKHR
vkGetBufferMemoryRequirements :: ("device" ::: VkDevice) -> ("buffer" ::: VkBuffer) -> ("pMemoryRequirements" ::: Ptr VkMemoryRequirements) -> IO () Source #
vkGetBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object
Parameters
deviceis the logical device that owns the buffer.
bufferis the buffer to query.pMemoryRequirementspoints to an instance of theVkMemoryRequirementsstructure in which the memory requirements of the buffer object are returned.
Description
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
buffermust be a validVkBufferhandlepMemoryRequirementsmust be a valid pointer to aVkMemoryRequirementsstructurebuffermust have been created, allocated, or retrieved fromdevice
See Also
vkBindBufferMemory :: ("device" ::: VkDevice) -> ("buffer" ::: VkBuffer) -> ("memory" ::: VkDeviceMemory) -> ("memoryOffset" ::: VkDeviceSize) -> IO VkResult Source #
vkBindBufferMemory - Bind device memory to a buffer object
Parameters
deviceis the logical device that owns the buffer and memory.
bufferis the buffer to be attached to memory.memoryis aVkDeviceMemoryobject describing the device memory to attach.memoryOffsetis the start offset of the region ofmemorywhich is to be bound to the buffer. The number of bytes returned in theVkMemoryRequirements::sizemember inmemory, starting frommemoryOffsetbytes, will be bound to the specified buffer.
Description
vkBindBufferMemory is equivalent to passing the same parameters
through
VkBindBufferMemoryInfo
to
vkBindBufferMemory2.
Valid Usage
buffermust not already be backed by a memory object
buffermust not have been created with any sparse memory binding flagsmemoryOffsetmust be less than the size ofmemory- If
bufferwas created with theVK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BITorVK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT,memoryOffsetmust be a multiple ofVkPhysicalDeviceLimits::minTexelBufferOffsetAlignment - If
bufferwas created with theVK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,memoryOffsetmust be a multiple ofVkPhysicalDeviceLimits::minUniformBufferOffsetAlignment - If
bufferwas created with theVK_BUFFER_USAGE_STORAGE_BUFFER_BIT,memoryOffsetmust be a multiple ofVkPhysicalDeviceLimits::minStorageBufferOffsetAlignment memorymust have been allocated using one of the memory types allowed in thememoryTypeBitsmember of theVkMemoryRequirementsstructure returned from a call tovkGetBufferMemoryRequirementswithbuffermemoryOffsetmust be an integer multiple of thealignmentmember of theVkMemoryRequirementsstructure returned from a call tovkGetBufferMemoryRequirementswithbuffer- The
sizemember of theVkMemoryRequirementsstructure returned from a call tovkGetBufferMemoryRequirementswithbuffermust be less than or equal to the size ofmemoryminusmemoryOffset - If
bufferrequires a dedicated allocation(as reported byvkGetBufferMemoryRequirements2inVkMemoryDedicatedRequirements::requiresDedicatedAllocation forbuffer),memorymust have been created withVkMemoryDedicatedAllocateInfo::bufferequal tobuffer - If the
VkMemoryAllocateInfoprovided whenmemorywas allocated included an instance ofVkMemoryDedicatedAllocateInfoin itspNextchain, andVkMemoryDedicatedAllocateInfo::bufferwas notVK_NULL_HANDLE, thenbuffermust equalVkMemoryDedicatedAllocateInfo::buffer, andmemoryOffsetmust be zero. - If
bufferwas created withVkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocationequal toVK_TRUE,memorymust have been created withVkDedicatedAllocationMemoryAllocateInfoNV::bufferequal to a buffer handle created with identical creation parameters tobufferandmemoryOffsetmust be zero
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
buffermust be a validVkBufferhandlememorymust be a validVkDeviceMemoryhandlebuffermust have been created, allocated, or retrieved fromdevicememorymust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
buffermust be externally synchronized
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkBuffer, VkDevice,
VkDeviceMemory, VkDeviceSize
vkGetImageMemoryRequirements :: ("device" ::: VkDevice) -> ("image" ::: VkImage) -> ("pMemoryRequirements" ::: Ptr VkMemoryRequirements) -> IO () Source #
vkGetImageMemoryRequirements - Returns the memory requirements for specified Vulkan object
Parameters
deviceis the logical device that owns the image.
imageis the image to query.pMemoryRequirementspoints to an instance of theVkMemoryRequirementsstructure in which the memory requirements of the image object are returned.
Description
Valid Usage
imagemust not have been created with theVK_IMAGE_CREATE_DISJOINT_BITflag set
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
imagemust be a validVkImagehandlepMemoryRequirementsmust be a valid pointer to aVkMemoryRequirementsstructureimagemust have been created, allocated, or retrieved fromdevice
See Also
vkBindImageMemory :: ("device" ::: VkDevice) -> ("image" ::: VkImage) -> ("memory" ::: VkDeviceMemory) -> ("memoryOffset" ::: VkDeviceSize) -> IO VkResult Source #
vkBindImageMemory - Bind device memory to an image object
Parameters
deviceis the logical device that owns the image and memory.
imageis the image.memoryis theVkDeviceMemoryobject describing the device memory to attach.memoryOffsetis the start offset of the region ofmemorywhich is to be bound to the image. The number of bytes returned in theVkMemoryRequirements::sizemember inmemory, starting frommemoryOffsetbytes, will be bound to the specified image.
Description
vkBindImageMemory is equivalent to passing the same parameters through
VkBindImageMemoryInfo
to
vkBindImageMemory2.
Valid Usage
imagemust not have been created with theVK_IMAGE_CREATE_DISJOINT_BITset.
imagemust not already be backed by a memory objectimagemust not have been created with any sparse memory binding flagsmemoryOffsetmust be less than the size ofmemorymemorymust have been allocated using one of the memory types allowed in thememoryTypeBitsmember of theVkMemoryRequirementsstructure returned from a call tovkGetImageMemoryRequirementswithimagememoryOffsetmust be an integer multiple of thealignmentmember of theVkMemoryRequirementsstructure returned from a call tovkGetImageMemoryRequirementswithimage- The
sizemember of theVkMemoryRequirementsstructure returned from a call tovkGetImageMemoryRequirementswithimagemust be less than or equal to the size ofmemoryminusmemoryOffset - If
imagerequires a dedicated allocation (as reported byvkGetImageMemoryRequirements2inVkMemoryDedicatedRequirements::requiresDedicatedAllocation forimage),memorymust have been created withVkMemoryDedicatedAllocateInfo::imageequal toimage - If the
VkMemoryAllocateInfoprovided whenmemorywas allocated included an instance ofVkMemoryDedicatedAllocateInfoin itspNextchain, andVkMemoryDedicatedAllocateInfo::imagewas notVK_NULL_HANDLE, thenimagemust equalVkMemoryDedicatedAllocateInfo::imageandmemoryOffsetmust be zero. - If
imagewas created withVkDedicatedAllocationImageCreateInfoNV::dedicatedAllocationequal toVK_TRUE,memorymust have been created withVkDedicatedAllocationMemoryAllocateInfoNV::imageequal to an image handle created with identical creation parameters toimageandmemoryOffsetmust be zero
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
imagemust be a validVkImagehandlememorymust be a validVkDeviceMemoryhandleimagemust have been created, allocated, or retrieved fromdevicememorymust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
imagemust be externally synchronized
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkDevice,
VkDeviceMemory, VkDeviceSize,
VkImage
data VkMemoryRequirements Source #
VkMemoryRequirements - Structure specifying memory requirements
Description
See Also
VkDeviceSize,
VkMemoryRequirements2,
vkGetBufferMemoryRequirements, vkGetImageMemoryRequirements
Constructors
| VkMemoryRequirements | |
Fields
| |