Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- 1
- Ratification Status
- Not ratified
- Extension and Version Dependencies; Contact
- Extension Proposal
- VK_EXT_metal_objects
Other Extension Metadata
- Last Modified Date
- 2022-05-28
- 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
Extending
ExportMetalObjectsInfoEXT
:Extending
ImageCreateInfo
:Extending
InstanceCreateInfo
,MemoryAllocateInfo
,ImageCreateInfo
,ImageViewCreateInfo
,BufferViewCreateInfo
,SemaphoreCreateInfo
,EventCreateInfo
:Extending
MemoryAllocateInfo
:Extending
SemaphoreCreateInfo
,EventCreateInfo
:
New Enums
New Bitmasks
New Enum Constants
EXT_METAL_OBJECTS_SPEC_VERSION
Extending
StructureType
:STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT
STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT
STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT
STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT
STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT
STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT
STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT
STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT
STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT
STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT
STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT
STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT
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.
See Also
IOSurfaceRef
, MTLBuffer_id
, MTLCommandQueue_id
, MTLDevice_id
,
MTLSharedEvent_id
, MTLTexture_id
, ExportMetalBufferInfoEXT
,
ExportMetalCommandQueueInfoEXT
, ExportMetalDeviceInfoEXT
,
ExportMetalIOSurfaceInfoEXT
, ExportMetalObjectCreateInfoEXT
,
ExportMetalObjectTypeFlagBitsEXT
, ExportMetalObjectTypeFlagsEXT
,
ExportMetalObjectsInfoEXT
, ExportMetalSharedEventInfoEXT
,
ExportMetalTextureInfoEXT
, ImportMetalBufferInfoEXT
,
ImportMetalIOSurfaceInfoEXT
, ImportMetalSharedEventInfoEXT
,
ImportMetalTextureInfoEXT
, exportMetalObjectsEXT
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.
Synopsis
- exportMetalObjectsEXT :: forall a io. (Extendss ExportMetalObjectsInfoEXT a, PokeChain a, PeekChain a, MonadIO io) => Device -> io (ExportMetalObjectsInfoEXT a)
- data ExportMetalObjectCreateInfoEXT = ExportMetalObjectCreateInfoEXT {}
- data ExportMetalObjectsInfoEXT (es :: [Type]) = ExportMetalObjectsInfoEXT {}
- data ExportMetalDeviceInfoEXT = ExportMetalDeviceInfoEXT {}
- data ExportMetalCommandQueueInfoEXT = ExportMetalCommandQueueInfoEXT {}
- data ExportMetalBufferInfoEXT = ExportMetalBufferInfoEXT {}
- data ImportMetalBufferInfoEXT = ImportMetalBufferInfoEXT {}
- data ExportMetalTextureInfoEXT = ExportMetalTextureInfoEXT {}
- data ImportMetalTextureInfoEXT = ImportMetalTextureInfoEXT {}
- data ExportMetalIOSurfaceInfoEXT = ExportMetalIOSurfaceInfoEXT {
- image :: Image
- ioSurface :: IOSurfaceRef
- data ImportMetalIOSurfaceInfoEXT = ImportMetalIOSurfaceInfoEXT {}
- data ExportMetalSharedEventInfoEXT = ExportMetalSharedEventInfoEXT {}
- data ImportMetalSharedEventInfoEXT = ImportMetalSharedEventInfoEXT {}
- type ExportMetalObjectTypeFlagsEXT = ExportMetalObjectTypeFlagBitsEXT
- newtype ExportMetalObjectTypeFlagBitsEXT where
- ExportMetalObjectTypeFlagBitsEXT Flags
- pattern EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
- pattern EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
- pattern EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
- pattern EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
- pattern EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
- pattern EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT :: ExportMetalObjectTypeFlagBitsEXT
- type EXT_METAL_OBJECTS_SPEC_VERSION = 1
- pattern EXT_METAL_OBJECTS_SPEC_VERSION :: forall a. Integral a => a
- type EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"
- pattern EXT_METAL_OBJECTS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- type MTLDevice_id = Ptr ()
- type MTLCommandQueue_id = Ptr ()
- type MTLBuffer_id = Ptr ()
- type MTLTexture_id = Ptr ()
- type IOSurfaceRef = Ptr ()
- type MTLSharedEvent_id = Ptr ()
Documentation
exportMetalObjectsEXT Source #
:: forall a io. (Extendss ExportMetalObjectsInfoEXT a, PokeChain a, PeekChain a, MonadIO io) | |
=> Device |
|
-> io (ExportMetalObjectsInfoEXT a) |
vkExportMetalObjectsEXT - Export Metal objects from the corresponding Vulkan objects
Valid Usage (Implicit)
See Also
data ExportMetalObjectCreateInfoEXT Source #
VkExportMetalObjectCreateInfoEXT - Structure that identifies the Metal objects that can be exported from Vulkan objects
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT
-
If
exportObjectType
is not0
,exportObjectType
must be a validExportMetalObjectTypeFlagBitsEXT
value
See Also
VK_EXT_metal_objects,
ExportMetalObjectTypeFlagBitsEXT
,
StructureType
ExportMetalObjectCreateInfoEXT | |
|
Instances
data ExportMetalObjectsInfoEXT (es :: [Type]) Source #
VkExportMetalObjectsInfoEXT - Structure whose pNext chain identifies Vulkan objects and corresponding Metal objects
Valid Usage
- If the
pNext
chain includes aExportMetalDeviceInfoEXT
structure, theInstance
must have been created withEXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theInstanceCreateInfo
structure in thecreateInstance
command
- If the
pNext
chain includes aExportMetalCommandQueueInfoEXT
structure, theInstance
must have been created withEXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theInstanceCreateInfo
structure in thecreateInstance
command - If the
pNext
chain includes aExportMetalBufferInfoEXT
structure, theDeviceMemory
in itsmemory
member must have been allocated withEXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theMemoryAllocateInfo
structure in theallocateMemory
command - If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, exactly one of itsimage
,imageView
, orbufferView
members must not beNULL_HANDLE
- If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, and itsimage
member is notNULL_HANDLE
, theImage
in itsimage
member must have been created withEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theImageCreateInfo
structure in thecreateImage
command - If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, and itsimageView
member is notNULL_HANDLE
, theImageView
in itsimageView
member must have been created withEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theImageViewCreateInfo
structure in thecreateImageView
command - If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, and itsbufferView
member is notNULL_HANDLE
, theBufferView
in itsbufferView
member must have been created withEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theBufferViewCreateInfo
structure in thecreateBufferView
command - If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, and if either itsimage
orimageView
member is notNULL_HANDLE
, thenplane
must beIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
, orIMAGE_ASPECT_PLANE_2_BIT
- If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, and if theImage
in itsimage
member does not have a multi-planar format, then itsplane
member must beIMAGE_ASPECT_PLANE_0_BIT
- If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, and if theImage
in itsimage
member has a multi-planar format with only two planes, then itsplane
member must not beIMAGE_ASPECT_PLANE_2_BIT
- If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, and if theImageView
in itsimageView
member does not have a multi-planar format, then itsplane
member must beIMAGE_ASPECT_PLANE_0_BIT
- If the
pNext
chain includes aExportMetalTextureInfoEXT
structure, and if theImageView
in itsimageView
member has a multi-planar format with only two planes, then itsplane
member must not beIMAGE_ASPECT_PLANE_2_BIT
- If the
pNext
chain includes aExportMetalIOSurfaceInfoEXT
structure, theImage
in itsimage
member must have been created withEXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theImageCreateInfo
structure in thecreateImage
command - If the
pNext
chain includes aExportMetalSharedEventInfoEXT
structure, exactly one of itssemaphore
orevent
members must not beNULL_HANDLE
- If the
pNext
chain includes aExportMetalSharedEventInfoEXT
structure, and itssemaphore
member is notNULL_HANDLE
, theSemaphore
in itssemaphore
member must have been created withEXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theSemaphoreCreateInfo
structure in thecreateSemaphore
command - If the
pNext
chain includes aExportMetalSharedEventInfoEXT
structure, and itsevent
member is notNULL_HANDLE
, theEvent
in itsevent
member must have been created withEXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT
in theexportObjectType
member of aExportMetalObjectCreateInfoEXT
structure in thepNext
chain of theEventCreateInfo
structure in thecreateEvent
command
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofExportMetalBufferInfoEXT
,ExportMetalCommandQueueInfoEXT
,ExportMetalDeviceInfoEXT
,ExportMetalIOSurfaceInfoEXT
,ExportMetalSharedEventInfoEXT
, orExportMetalTextureInfoEXT
- The
sType
value of each struct in thepNext
chain must be unique, with the exception of structures of typeExportMetalBufferInfoEXT
,ExportMetalCommandQueueInfoEXT
,ExportMetalIOSurfaceInfoEXT
,ExportMetalSharedEventInfoEXT
, orExportMetalTextureInfoEXT
See Also
Instances
data ExportMetalDeviceInfoEXT Source #
VkExportMetalDeviceInfoEXT - Structure that identifies a VkDevice object and corresponding Metal MTLDevice object
Valid Usage (Implicit)
See Also
ExportMetalDeviceInfoEXT | |
|
Instances
data ExportMetalCommandQueueInfoEXT Source #
VkExportMetalCommandQueueInfoEXT - Structure that identifies a VkQueue object and corresponding Metal MTLCommandQueue object
Valid Usage (Implicit)
See Also
Instances
data ExportMetalBufferInfoEXT Source #
VkExportMetalBufferInfoEXT - Structure that identifies a VkDeviceMemory object and corresponding Metal MTLBuffer object
Valid Usage (Implicit)
See Also
ExportMetalBufferInfoEXT | |
|
Instances
data ImportMetalBufferInfoEXT Source #
VkImportMetalBufferInfoEXT - Structure that identifies a Metal MTLBuffer object to use when creating a VkDeviceMemory object.
Description
The app 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.
Valid Usage (Implicit)
See Also
ImportMetalBufferInfoEXT | |
|
Instances
data ExportMetalTextureInfoEXT Source #
VkExportMetalTextureInfoEXT - Structure that identifies a VkImage, VkImageView, or VkBufferView object and corresponding Metal MTLTexture object
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT
- If
image
is notNULL_HANDLE
,image
must be a validImage
handle - If
imageView
is notNULL_HANDLE
,imageView
must be a validImageView
handle - If
bufferView
is notNULL_HANDLE
,bufferView
must be a validBufferView
handle -
plane
must be a validImageAspectFlagBits
value - Each of
bufferView
,image
, andimageView
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
VK_EXT_metal_objects,
BufferView
, Image
,
ImageAspectFlagBits
,
ImageView
,
StructureType
ExportMetalTextureInfoEXT | |
|
Instances
data ImportMetalTextureInfoEXT Source #
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 app
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.
Valid Usage (Implicit)
See Also
ImportMetalTextureInfoEXT | |
|
Instances
data ExportMetalIOSurfaceInfoEXT Source #
VkExportMetalIOSurfaceInfoEXT - Structure that identifies a VkImage object and corresponding Metal IOSurfaceRef object
Valid Usage (Implicit)
See Also
ExportMetalIOSurfaceInfoEXT | |
|
Instances
data ImportMetalIOSurfaceInfoEXT Source #
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 app 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.
Valid Usage (Implicit)
See Also
ImportMetalIOSurfaceInfoEXT | |
|
Instances
data ExportMetalSharedEventInfoEXT Source #
VkExportMetalSharedEventInfoEXT - Structure that identifies a VkSemaphore or VkEvent object and corresponding Metal MTLSharedEvent object
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT
- If
semaphore
is notNULL_HANDLE
,semaphore
must be a validSemaphore
handle - If
event
is notNULL_HANDLE
,event
must be a validEvent
handle - Both of
event
, andsemaphore
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
ExportMetalSharedEventInfoEXT | |
|
Instances
data ImportMetalSharedEventInfoEXT Source #
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 initialValue
of
SemaphoreTypeCreateInfo
.
Valid Usage (Implicit)
See Also
Instances
newtype ExportMetalObjectTypeFlagBitsEXT Source #
VkExportMetalObjectTypeFlagBitsEXT - Bitmask specifying Metal object types that can be exported from a Vulkan object
See Also
VK_EXT_metal_objects,
ExportMetalObjectCreateInfoEXT
, ExportMetalObjectTypeFlagsEXT
Instances
type EXT_METAL_OBJECTS_SPEC_VERSION = 1 Source #
pattern EXT_METAL_OBJECTS_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects" Source #
pattern EXT_METAL_OBJECTS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
type MTLDevice_id = Ptr () Source #
type MTLCommandQueue_id = Ptr () Source #
type MTLBuffer_id = Ptr () Source #
type MTLTexture_id = Ptr () Source #
type IOSurfaceRef = Ptr () Source #
type MTLSharedEvent_id = Ptr () Source #