vulkan-3.26.1: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Core10.MemoryManagement

Synopsis

Documentation

getBufferMemoryRequirements Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that owns the buffer.

device must be a valid Device handle

-> Buffer

buffer is the buffer to query.

buffer must be a valid Buffer handle

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

-> io MemoryRequirements 

vkGetBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object

Valid Usage (Implicit)

See Also

VK_VERSION_1_0, Buffer, Device, MemoryRequirements

bindBufferMemory Source #

Arguments

:: forall io. MonadIO io 
=> Device

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

-> Buffer

buffer is the buffer to be attached to memory.

-> DeviceMemory

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

-> ("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.

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

getImageMemoryRequirements Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that owns the image.

-> Image

image is the image to query.

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

bindImageMemory Source #

Arguments

:: forall io. MonadIO io 
=> Device

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

-> Image

image is the image.

-> DeviceMemory

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

-> ("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.

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

data MemoryRequirements Source #

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

Instances details
Storable MemoryRequirements Source # 
Instance details

Defined in Vulkan.Core10.MemoryManagement

Show MemoryRequirements Source # 
Instance details

Defined in Vulkan.Core10.MemoryManagement

Eq MemoryRequirements Source # 
Instance details

Defined in Vulkan.Core10.MemoryManagement

FromCStruct MemoryRequirements Source # 
Instance details

Defined in Vulkan.Core10.MemoryManagement

ToCStruct MemoryRequirements Source # 
Instance details

Defined in Vulkan.Core10.MemoryManagement

Zero MemoryRequirements Source # 
Instance details

Defined in Vulkan.Core10.MemoryManagement

newtype DeviceMemory Source #

Constructors

DeviceMemory Word64 

Instances

Instances details
Storable DeviceMemory Source # 
Instance details

Defined in Vulkan.Core10.Handles

Show DeviceMemory Source # 
Instance details

Defined in Vulkan.Core10.Handles

Eq DeviceMemory Source # 
Instance details

Defined in Vulkan.Core10.Handles

Ord DeviceMemory Source # 
Instance details

Defined in Vulkan.Core10.Handles

HasObjectType DeviceMemory Source # 
Instance details

Defined in Vulkan.Core10.Handles

IsHandle DeviceMemory Source # 
Instance details

Defined in Vulkan.Core10.Handles

Zero DeviceMemory Source # 
Instance details

Defined in Vulkan.Core10.Handles