HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Core10.MemoryManagement

  • 2 types
  • 4 values
  • Packagevulkan-3.27
  • Exports6
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceMemoryManagement.hs
valuebindBufferMemory
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the buffer and memory.

  3. -> Buffer

    buffer is the buffer to be attached to memory.

  4. -> DeviceMemory

    memory is a DeviceMemory object describing the device memory to attach.

  5. -> "memoryOffset" ::: DeviceSize

    memoryOffset is the start offset of the region of memory which is to be bound to the buffer. The number of bytes returned in the MemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified buffer.

  6. -> 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 have been bound to a memory object

Valid Usage (Implicit)

  • device must be a valid Device handle

  • buffer must be a valid Buffer handle

  • memory must be a valid DeviceMemory handle

  • buffer must have been created, allocated, or retrieved from device

  • memory must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to buffer must be externally synchronized

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, Buffer, Device, DeviceMemory, DeviceSize

valuegetImageMemoryRequirements
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the image.

  3. -> Image

    image is the image to query.

  4. -> io MemoryRequirements
#

vkGetImageMemoryRequirements - Returns the memory requirements for specified Vulkan object

Valid Usage

Valid Usage (Implicit)

  • device must be a valid Device handle

  • image must be a valid Image handle

  • pMemoryRequirements must be a valid pointer to a MemoryRequirements structure

  • image must have been created, allocated, or retrieved from device

See Also

VK_VERSION_1_0, Device, Image, MemoryRequirements

valuebindImageMemory
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the image and memory.

  3. -> Image

    image is the image.

  4. -> DeviceMemory

    memory is the DeviceMemory object describing the device memory to attach.

  5. -> "memoryOffset" ::: DeviceSize

    memoryOffset is the start offset of the region of memory which is to be bound to the image. The number of bytes returned in the MemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified image.

  6. -> 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 bound to a memory object

Valid Usage (Implicit)

  • device must be a valid Device handle

  • image must be a valid Image handle

  • memory must be a valid DeviceMemory handle

  • image must have been created, allocated, or retrieved from device

  • memory must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to image must be externally synchronized

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, Device, DeviceMemory, DeviceSize, Image

datadata MemoryRequirements
#

Constructors

  • MemoryRequirements
    • size :: DeviceSize

      size is the size, in bytes, of the memory allocation required for the resource.

    • alignment :: DeviceSize

      alignment is the alignment, in bytes, of the offset within the allocation required for the resource.

    • memoryTypeBits :: Word32

      memoryTypeBits is a bitmask and contains one bit set for every supported memory type for the resource. Bit i is set if and only if the memory type i in the PhysicalDeviceMemoryProperties structure for the physical device is supported for the resource.

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
newtypenewtype DeviceMemory
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …