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.Extensions.VK_EXT_external_memory_metal

Name

VK_EXT_external_memory_metal - device extension

VK_EXT_external_memory_metal

Name String

VK_EXT_external_memory_metal

Extension Type

Device extension

Registered Extension Number

603

Revision

1

Ratification Status

Ratified

Extension and Version Dependencies

VK_KHR_external_memory

or

Vulkan Version 1.1

Contact
Extension Proposal

VK_EXT_external_memory_metal

Other Extension Metadata

Last Modified Date

2024-07-18

IP Status

No known IP claims.

Contributors
  • Aitor Camacho Larrondo, LunarG Inc.

Description

An application may wish to reference device memory in multiple Vulkan device instances, in multiple processes, and/or in Metal API. This extension enables an application to export and import Metal handles from Vulkan memory objects such that the underlying resources can be referenced outside the scope of the Vulkan device instance that created them.

New Commands

New Structures

New Enum Constants

Version History

  • Revision 1, 2024-07-18 (Aitor Camacho Larrondo)

    • Initial revision

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification.

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

  • 5 types
  • 2 values
  • Packagevulkan-3.27
  • Exports9
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_external_memory_metal.hs
valuegetMemoryMetalHandleEXT
  1. :: MonadIO io
  2. => Device

    device is the logical device that created the device memory being exported.

    device must be a valid Device handle

  3. -> MemoryGetMetalHandleInfoEXT

    pGetMetalHandleInfo is a pointer to a MemoryGetMetalHandleInfoEXT structure containing parameters of the export operation.

    pGetMetalHandleInfo must be a valid pointer to a valid MemoryGetMetalHandleInfoEXT structure

  4. -> io ("handle" ::: Ptr ())
#

vkGetMemoryMetalHandleEXT - Get a Metal handle for a memory object

Description

Unless the app retains the handle object returned by the call, the lifespan will be the same as the associated DeviceMemory.

Return Codes

Success
Failure

See Also

VK_EXT_external_memory_metal, Device, MemoryGetMetalHandleInfoEXT

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

    device is the logical device that will be importing pHandle.

    device must be a valid Device handle

  3. -> ExternalMemoryHandleTypeFlagBits
  4. -> "handle" ::: Ptr ()

    pHandle is the handle which will be imported.

    pHandle must point to a valid id<MTLBuffer>, id<MTLTexture> or id<MTLDevice>

    pHandle must be a pointer value

  5. -> io MemoryMetalHandlePropertiesEXT
#

VkImportMemoryMetalHandleInfoEXT - Import Metal memory created on the same physical device

Description

Importing memory object payloads from Metal handles shares the ownership of the handle to the Vulkan implementation.

Applications can import the same payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance. In all cases, each import operation must create a distinct DeviceMemory object.

Valid Usage

Valid Usage (Implicit)

Structure Chaining

Extends the structure

See Also

VK_EXT_external_memory_metal, ExternalMemoryHandleTypeFlagBits, StructureType

Constructors

Instances5Show, Storable, FromCStruct, ToCStruct, Zero

VkMemoryMetalHandlePropertiesEXT - Properties of External Memory Metal Handles

Valid Usage (Implicit)

See Also

VK_EXT_external_memory_metal, StructureType, getMemoryMetalHandlePropertiesEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkMemoryGetMetalHandleInfoEXT - Structure describing a Metal handle memory export operation

Description

The properties of the handle returned depend on the value of handleType. See ExternalMemoryHandleTypeFlagBits for a description of the properties of the defined external memory handle types.

Valid Usage (Implicit)

See Also

VK_EXT_external_memory_metal, DeviceMemory, ExternalMemoryHandleTypeFlagBits, StructureType, getMemoryMetalHandleEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero