vulkan-2.0.0.1: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core11.Promoted_from_VK_KHR_bind_memory2

Synopsis

Documentation

vkBindBufferMemory2 :: ("device" ::: VkDevice) -> ("bindInfoCount" ::: Word32) -> ("pBindInfos" ::: Ptr VkBindBufferMemoryInfo) -> IO VkResult Source #

vkBindBufferMemory2 - Bind device memory to buffer objects

Parameters

  • device is the logical device that owns the buffers and memory.
  • bindInfoCount is the number of elements in pBindInfos.
  • pBindInfos is a pointer to an array of structures of type VkBindBufferMemoryInfo, describing buffers and memory to bind.

Description

On some implementations, it may be more efficient to batch memory bindings into a single command.

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • pBindInfos must be a valid pointer to an array of bindInfoCount valid VkBindBufferMemoryInfo structures
  • bindInfoCount must be greater than 0

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

VkBindBufferMemoryInfo, VkDevice

vkBindImageMemory2 :: ("device" ::: VkDevice) -> ("bindInfoCount" ::: Word32) -> ("pBindInfos" ::: Ptr VkBindImageMemoryInfo) -> IO VkResult Source #

vkBindImageMemory2 - Bind device memory to image objects

Parameters

  • device is the logical device that owns the images and memory.
  • bindInfoCount is the number of elements in pBindInfos.
  • pBindInfos is a pointer to an array of structures of type VkBindImageMemoryInfo, describing images and memory to bind.

Description

On some implementations, it may be more efficient to batch memory bindings into a single command.

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • pBindInfos must be a valid pointer to an array of bindInfoCount valid VkBindImageMemoryInfo structures
  • bindInfoCount must be greater than 0

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

VkBindImageMemoryInfo, VkDevice

data VkBindBufferMemoryInfo Source #

VkBindBufferMemoryInfo - Structure specifying how to bind a buffer to memory

Valid Usage

  • buffer must not already be backed by a memory object
  • buffer must not have been created with any sparse memory binding flags
  • memoryOffset must be less than the size of memory
  • If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment
  • If buffer was created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment
  • If buffer was created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment
  • memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer
  • memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer
  • The size member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer must be less than or equal to the size of memory minus memoryOffset
  • If buffer requires a dedicated allocation(as reported by vkGetBufferMemoryRequirements2 in VkMemoryDedicatedRequirements::requiresDedicatedAllocation for buffer), memory must have been created with VkMemoryDedicatedAllocateInfo::buffer equal to buffer and memoryOffset must be zero
  • If the VkMemoryAllocateInfo provided when memory was allocated included an instance of VkMemoryDedicatedAllocateInfo in its pNext chain, and VkMemoryDedicatedAllocateInfo::buffer was not VK_NULL_HANDLE, then buffer must equal VkMemoryDedicatedAllocateInfo::buffer and memoryOffset must be zero.
  • If buffer was created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::buffer equal to buffer and memoryOffset must be zero
  • If the pNext chain includes VkBindBufferMemoryDeviceGroupInfo, all instances of memory specified by VkBindBufferMemoryDeviceGroupInfo::pDeviceIndices must have been allocated

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO
  • pNext must be NULL or a pointer to a valid instance of VkBindBufferMemoryDeviceGroupInfo
  • buffer must be a valid VkBuffer handle
  • memory must be a valid VkDeviceMemory handle
  • Both of buffer, and memory must have been created, allocated, or retrieved from the same VkDevice

See Also

VkBuffer, VkDeviceMemory, VkDeviceSize, VkStructureType, vkBindBufferMemory2, vkBindBufferMemory2KHR

Constructors

VkBindBufferMemoryInfo 

Fields

  • vkSType :: VkStructureType

    sType is the type of this structure.

  • vkPNext :: Ptr ()

    pNext is NULL or a pointer to an extension-specific structure.

  • vkBuffer :: VkBuffer

    buffer is the buffer to be attached to memory.

  • vkMemory :: VkDeviceMemory

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

  • vkMemoryOffset :: VkDeviceSize

    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 VkMemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified buffer.

data VkBindImageMemoryInfo Source #

VkBindImageMemoryInfo - Structure specifying how to bind an image to memory

Valid Usage

  • image must not already be backed by a memory object

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO

See Also

VkDeviceMemory, VkDeviceSize, VkImage, VkStructureType, vkBindImageMemory2, vkBindImageMemory2KHR

Constructors

VkBindImageMemoryInfo 

Fields

  • vkSType :: VkStructureType

    sType is the type of this structure.

  • vkPNext :: Ptr ()

    pNext is NULL or a pointer to an extension-specific structure.

  • vkImage :: VkImage

    image is the image to be attached to memory.

  • vkMemory :: VkDeviceMemory

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

  • vkMemoryOffset :: VkDeviceSize

    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 VkMemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified image.