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

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_EXT_metal_objects

Name

VK_EXT_metal_objects - device extension

VK_EXT_metal_objects

Name String

VK_EXT_metal_objects

Extension Type

Device extension

Registered Extension Number

312

Revision

2

Ratification Status

Ratified

Extension and Version Dependencies

None

Contact
Extension Proposal

VK_EXT_metal_objects

Other Extension Metadata

Last Modified Date

2024-04-04

IP Status

No known IP claims.

Contributors
  • Bill Hollings, The Brenwill Workshop Ltd.

  • Dzmitry Malyshau, Mozilla Corp.

Description

In a Vulkan implementation that is layered on top of Metal on Apple device platforms, this extension provides the ability to import and export the underlying Metal objects associated with specific Vulkan objects.

As detailed in the extension proposal document, this extension adds one new Vulkan command, exportMetalObjectsEXT, to export underlying Metal objects from Vulkan objects, and supports importing the appropriate existing Metal objects when creating Vulkan objects of types DeviceMemory, Image, Semaphore, and Event,

The intent is that this extension will be advertised and supported only on implementations that are layered on top of Metal on Apple device platforms.

New Base Types

New Commands

New Structures

New Enums

New Bitmasks

New Enum Constants

Issues

None.

Version History

  • Revision 1, 2022-05-28 (Bill Hollings)

    • Initial draft.

    • Incorporated feedback from review by the Vulkan Working Group. Renamed many structures, moved import/export of MTLBuffer to VkDeviceMemory, added export of MTLSharedEvent, added import of MTLSharedEvent for VkSemaphore and VkEvent, and changed used bit mask fields to individual bit fields to simplify Valid Usage rules.

  • Revision 2, 2024-04-04 (Bill Hollings)

    • Add an __unsafe_unretained ownership qualifier to all Metal object declarations, to support Automatic Reference Counting (ARC) on Apple devices.

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.

  • 22 types
  • 1 value
  • Packagevulkan-3.27
  • Exports31
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_metal_objects.hs

VkExportMetalObjectCreateInfoEXT - Structure that identifies the Metal objects that can be exported from Vulkan objects

Valid Usage (Implicit)

Structure Chaining

Extends the structures

See Also

VK_EXT_metal_objects, ExportMetalObjectTypeFlagBitsEXT, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
datadata ExportMetalObjectsInfoEXT (es :: [Type])
#

VkExportMetalObjectsInfoEXT - Structure whose pNext chain identifies Vulkan objects and corresponding Metal objects

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_metal_objects, StructureType, exportMetalObjectsEXT

Constructors

Instances5Extensible, Show, FromCStruct, ToCStruct, Zero

VkExportMetalDeviceInfoEXT - Structure that identifies a VkDevice object and corresponding Metal MTLDevice object

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkExportMetalCommandQueueInfoEXT - Structure that identifies a VkQueue object and corresponding Metal MTLCommandQueue object

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, Queue, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkExportMetalBufferInfoEXT - Structure that identifies a VkDeviceMemory object and corresponding Metal MTLBuffer object

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, DeviceMemory, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkImportMetalBufferInfoEXT - Structure that identifies a Metal MTLBuffer object to use when creating a VkDeviceMemory object.

Description

The application must ensure that the configuration of the id<MTLBuffer> object is compatible with the configuration of the DeviceMemory. Failure to do so results in undefined behavior.

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkExportMetalTextureInfoEXT - Structure that identifies a VkImage, VkImageView, or VkBufferView object and corresponding Metal MTLTexture object

Valid Usage (Implicit)

  • If image is not NULL_HANDLE, image must be a valid Image handle

  • If imageView is not NULL_HANDLE, imageView must be a valid ImageView handle

  • If bufferView is not NULL_HANDLE, bufferView must be a valid BufferView handle

  • plane must be a valid ImageAspectFlagBits value

  • Each of bufferView, image, and imageView that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same Device

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, BufferView, Image, ImageAspectFlagBits, ImageView, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkImportMetalTextureInfoEXT - Structure that identifies Metal MTLTexture objects to use when creating a VkImage.

Description

The pNext chain must include one ImportMetalTextureInfoEXT structure for each plane in the Image. The application must ensure that the configuration of the Metal id<MTLTexture> objects are compatible with the configuration of the Image. Failure to do so results in undefined behavior.

Due to id<MTLTexture> already being backed by memory, images created with ImportMetalTextureInfoEXT in the pNext of the ImageCreateInfo will be treated as bound to a VkDeviceMemory.

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, ImageAspectFlagBits, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkExportMetalIOSurfaceInfoEXT - Structure that identifies a VkImage object and corresponding Metal IOSurfaceRef object

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, Image, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkImportMetalIOSurfaceInfoEXT - Structure that identifies a VkImage object and corresponding Metal IOSurfaceRef object to use.

Description

If ioSurface is not NULL_HANDLE, it will be used to underlie the Image. If ioSurface is NULL_HANDLE, the implementation will create a new IOSurface to underlie the Image.

If provided, the application must ensure that the configuration of the IOSurfaceRef object is compatible with the configuration of the Image. Failure to do so results in undefined behavior.

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkExportMetalSharedEventInfoEXT - Structure that identifies a VkSemaphore or VkEvent object and corresponding Metal MTLSharedEvent object

Valid Usage (Implicit)

  • If semaphore is not NULL_HANDLE, semaphore must be a valid Semaphore handle

  • If event is not NULL_HANDLE, event must be a valid Event handle

  • Both of event, and semaphore that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same Device

Structure Chaining

Extends the structure

See Also

VK_EXT_metal_objects, Event, Semaphore, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkImportMetalSharedEventInfoEXT - Structure that identifies a VkSemaphore or VkEvent object and corresponding Metal Shared Event object to use.

Description

If the pNext chain of the SemaphoreCreateInfo structure includes both ImportMetalSharedEventInfoEXT and SemaphoreTypeCreateInfo, the signaledValue property of the imported id<MTLSharedEvent> object will be set to SemaphoreTypeCreateInfo::initialValue.

Structure Chaining

Extends the structures

See Also

VK_EXT_metal_objects, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkExportMetalObjectTypeFlagBitsEXT - Bitmask specifying Metal object types that can be exported from a Vulkan object

Description

See Also

VK_EXT_metal_objects, ExportMetalObjectCreateInfoEXT, ExportMetalObjectTypeFlagsEXT

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …