vulkan-3.1.0.0: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.MemoryManagement

Synopsis

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 a MemoryRequirements structure in which the memory requirements of the buffer object are returned.

Valid Usage (Implicit)

See Also

Buffer, Device, MemoryRequirements

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 a DeviceMemory object describing the device memory to attach.
  • 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.

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

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

Buffer, Device, DeviceMemory, DeviceSize

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 a MemoryRequirements structure in which the memory requirements of the image object are returned.

Valid Usage (Implicit)

See Also

Device, Image, MemoryRequirements

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 the DeviceMemory object describing the device memory to attach.
  • 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.

Description

bindImageMemory is equivalent to passing the same parameters through BindImageMemoryInfo to bindImageMemory2.

Valid Usage

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

Device, DeviceMemory, DeviceSize, Image

data MemoryRequirements Source #

VkMemoryRequirements - Structure specifying memory requirements

See Also

DeviceSize, MemoryRequirements2, getBufferMemoryRequirements, getImageMemoryRequirements

Constructors

MemoryRequirements 

Fields

  • 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.

Instances
Show MemoryRequirements Source # 
Instance details

Defined in Graphics.Vulkan.Core10.MemoryManagement

Storable MemoryRequirements Source # 
Instance details

Defined in Graphics.Vulkan.Core10.MemoryManagement

FromCStruct MemoryRequirements Source # 
Instance details

Defined in Graphics.Vulkan.Core10.MemoryManagement

ToCStruct MemoryRequirements Source # 
Instance details

Defined in Graphics.Vulkan.Core10.MemoryManagement

Zero MemoryRequirements Source # 
Instance details

Defined in Graphics.Vulkan.Core10.MemoryManagement