Data graphs
Data graph pipelines encapsulate computational graphs that operate on whole resources (e.g. tensors). The graph operations that form these computational graphs are executed by graph processing engines.
Pipeline Creation
To create data graph pipelines, call:
// Provided by VK_ARM_data_graph
VkResult vkCreateDataGraphPipelinesARM(
VkDevice device,
VkDeferredOperationKHR deferredOperation,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkDataGraphPipelineCreateInfoARM* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
VkPipeline* pPipelines);
-
device
is the logical device that creates the data graph pipelines. -
deferredOperation
is VK_NULL_HANDLE or the handle of a valid VkDeferredOperationKHR request deferral object for this command. -
pipelineCache
is either VK_NULL_HANDLE, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command. -
createInfoCount
is the length of thepCreateInfos
andpPipelines
arrays. -
pCreateInfos
is a pointer to an array of VkDataGraphPipelineCreateInfoARM structures. -
pAllocator
controls host memory allocation as described in the Memory Allocation chapter. -
pPipelines
is a pointer to an array of VkPipeline handles in which the resulting data graph pipelines objects are returned.
The implementation will create a pipeline in each element of
pPipelines
from the corresponding element of pCreateInfos
.
If the creation of any pipeline fails, that pipeline will be set to
VK_NULL_HANDLE.
The VkDataGraphPipelineCreateInfoARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineCreateInfoARM {
VkStructureType sType;
const void* pNext;
VkPipelineCreateFlags2KHR flags;
VkPipelineLayout layout;
uint32_t resourceInfoCount;
const VkDataGraphPipelineResourceInfoARM* pResourceInfos;
} VkDataGraphPipelineCreateInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
flags
is a bitmask of VkPipelineCreateFlagBits2KHR specifying how the pipeline will be generated. -
layout
is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. -
resourceInfoCount
is the length of thepResourceInfos
array. -
pResourceInfos
is a pointer to an array of VkDataGraphPipelineResourceInfoARM structures.
Applications can create a data graph pipeline entirely from data present in
a pipeline cache.
This is done by including a VkDataGraphPipelineIdentifierCreateInfoARM
structure in the pNext
chain.
If the required data is not found in the pipeline cache, creating the data
graph pipeline is not possible and the implementation must fail as
specified by VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT
.
When an identifier is used to create a data graph pipeline, implementations
may fail pipeline creation with VK_PIPELINE_COMPILE_REQUIRED
for any
reason.
The VkDataGraphPipelineShaderModuleCreateInfoARM
structure is defined
as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineShaderModuleCreateInfoARM {
VkStructureType sType;
const void* pNext;
VkShaderModule module;
const char* pName;
const VkSpecializationInfo* pSpecializationInfo;
uint32_t constantCount;
const VkDataGraphPipelineConstantARM* pConstants;
} VkDataGraphPipelineShaderModuleCreateInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
module
is optionally a VkShaderModule object containing the description of the graph. -
pName
is a pointer to a null-terminated UTF-8 string specifying the graph entry point name for this pipeline. -
pSpecializationInfo
is a pointer to a VkSpecializationInfo structure as described in Specialization Constants, orNULL
. -
constantCount
is the length of thepConstants
array. -
pConstants
is a pointer to an array of VkDataGraphPipelineConstantARM structures.
If module
is not VK_NULL_HANDLE, the pipeline’s graph is defined
by module
.
If module
is VK_NULL_HANDLE, the pipeline’s graph is defined by
the chained VkShaderModuleCreateInfo.
The VkDataGraphPipelineIdentifierCreateInfoARM
structure is defined
as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineIdentifierCreateInfoARM {
VkStructureType sType;
const void* pNext;
uint32_t identifierSize;
const uint8_t* pIdentifier;
} VkDataGraphPipelineIdentifierCreateInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
identifierSize
is the size in bytes of the identifier data accessible viapIdentifier
. -
pIdentifer
is a pointer toidentifierSize
bytes of data that describe the pipeline being created.
The VkDataGraphPipelineCompilerControlCreateInfoARM
structure is
defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineCompilerControlCreateInfoARM {
VkStructureType sType;
const void* pNext;
const char* pVendorOptions;
} VkDataGraphPipelineCompilerControlCreateInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
pVendorOptions
is a null-terminated UTF-8 string specifying implementation-specific options that affect the creation of a data graph pipeline.
The VkDataGraphPipelineConstantARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineConstantARM {
VkStructureType sType;
const void* pNext;
uint32_t id;
const void* pConstantData;
} VkDataGraphPipelineConstantARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
is a pointer to a structure extending this structure. -
id
is the unique identifier of the graph constant this structure describes. -
pConstantData
is a pointer to the data for this graph constant.
The size and layout of the data pointed to by pConstantData
is
specified by a specific structure in the pNext
chain for each type of
graph constant.
For graph constants of tensor type, the layout of the data is specified by a VkTensorDescriptionARM structure. The data must be laid out according to the following members of this structure:
-
VkTensorDescriptionARM::
tiling
-
VkTensorDescriptionARM::
format
-
VkTensorDescriptionARM::
dimensionCount
-
VkTensorDescriptionARM::
pDimensions
-
VkTensorDescriptionARM::
pStrides
The presence of a
VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM
structure in the pNext
chain has no impact on the expected layout of
the data pointed to by pConstantData
.
The VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM
structure is defined as:
// Provided by VK_ARM_data_graph with VK_ARM_tensors
typedef struct VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM {
VkStructureType sType;
const void* pNext;
uint32_t dimension;
uint32_t zeroCount;
uint32_t groupSize;
} VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
dimension
is the dimension of the tensor along which its data is sparse. -
zeroCount
is the number of tensor elements that must be zero in every group ofgroupSize
elements. -
groupSize
is the number of tensor elements in a group.
This extension does not provide applications with a way of knowing which
combinations of |
The VkDataGraphPipelineResourceInfoARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineResourceInfoARM {
VkStructureType sType;
const void* pNext;
uint32_t descriptorSet;
uint32_t binding;
uint32_t arrayElement;
} VkDataGraphPipelineResourceInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
descriptorSet
is the descriptor set number of the resource being described. -
binding
is the binding number of the resource being described. -
arrayElement
is the element in the resource array ifdescriptorSet
andbinding
identifies an array of resources or0
otherwise.
Sessions
Graph pipelines execute within data graph pipeline sessions that provide a context for their execution as well as binding points for the memory they need (e.g. transient storage).
Graph pipeline sessions are represented by
VkDataGraphPipelineSessionARM
handles:
// Provided by VK_ARM_data_graph
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDataGraphPipelineSessionARM)
To create a data graph pipeline session, call
// Provided by VK_ARM_data_graph
VkResult vkCreateDataGraphPipelineSessionARM(
VkDevice device,
const VkDataGraphPipelineSessionCreateInfoARM* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDataGraphPipelineSessionARM* pSession);
-
device
is the logical device that creates the data graph pipeline session. -
pCreateInfo
is a pointer to a VkDataGraphPipelineSessionCreateInfoARM structure. -
pAllocator
controls host memory allocation as described in the Memory Allocation chapter. -
pSession
is a pointer to a VkDataGraphPipelineSessionARM handle in which the resulting data graph pipeline session object is returned.
The VkDataGraphPipelineSessionCreateInfoARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineSessionCreateInfoARM {
VkStructureType sType;
const void* pNext;
VkDataGraphPipelineSessionCreateFlagsARM flags;
VkPipeline dataGraphPipeline;
} VkDataGraphPipelineSessionCreateInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
flags
is a bitmask of VkDataGraphPipelineSessionCreateFlagBitsARM describing additional parameters of the session. -
dataGraphPipeline
is the VkPipeline handle of the data graph pipeline for which a session is being created.
Bits which can be set in
VkDataGraphPipelineSessionCreateInfoARM::flags
, specifying
additional parameters of a data graph pipeline session, are:
// Provided by VK_ARM_data_graph
// Flag bits for VkDataGraphPipelineSessionCreateFlagBitsARM
typedef VkFlags64 VkDataGraphPipelineSessionCreateFlagBitsARM;
static const VkDataGraphPipelineSessionCreateFlagBitsARM VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM = 0x00000001ULL;
-
VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM
specifies that the data graph pipeline session is backed by protected memory.
// Provided by VK_ARM_data_graph
typedef VkFlags64 VkDataGraphPipelineSessionCreateFlagsARM;
VkDataGraphPipelineSessionCreateFlagsARM
is a bitmask type for setting
a mask of zero or more VkDataGraphPipelineSessionCreateFlagBitsARM.
To determine the bind point requirements for a data graph pipeline session, call:
// Provided by VK_ARM_data_graph
VkResult vkGetDataGraphPipelineSessionBindPointRequirementsARM(
VkDevice device,
const VkDataGraphPipelineSessionBindPointRequirementsInfoARM* pInfo,
uint32_t* pBindPointRequirementCount,
VkDataGraphPipelineSessionBindPointRequirementARM* pBindPointRequirements);
-
device
is the logical device that owns the data graph pipeline session. -
pInfo
is a pointer to a VkDataGraphPipelineSessionBindPointRequirementsInfoARM structure containing parameters for the bind point requirements query. -
pBindPointRequirementCount
is a pointer to an integer related to the number of bind point available or queried, as described below. -
pBindPointRequirements
is eitherNULL
or a pointer to an array of VkDataGraphPipelineSessionBindPointRequirementARM structures.
If pBindPointRequirements
is NULL
, then the number of bind points
associated with the data graph pipeline session is returned in
pBindPointRequirementCount
.
Otherwise, pBindPointRequirementCount
must point to a variable set by
the user to the number of elements in the pBindPointRequirements
array, and on return the variable is overwritten with the number of
structures actually written to pBindPointRequirements
.
If pBindPointRequirementCount
is less than the number of bind points
associated with the data graph pipeline session, at most
pBindPointRequirementCount
structures will be written, and
VK_INCOMPLETE
will be returned instead of VK_SUCCESS
, to
indicate that not all the required bind points were returned.
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineSessionBindPointRequirementsInfoARM {
VkStructureType sType;
const void* pNext;
VkDataGraphPipelineSessionARM session;
} VkDataGraphPipelineSessionBindPointRequirementsInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
session
is a VkDataGraphPipelineSessionARM specifying the data graph pipeline session whose bind point requirements are being queried.
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineSessionBindPointRequirementARM {
VkStructureType sType;
const void* pNext;
VkDataGraphPipelineSessionBindPointARM bindPoint;
VkDataGraphPipelineSessionBindPointTypeARM bindPointType;
uint32_t numObjects;
} VkDataGraphPipelineSessionBindPointRequirementARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
bindPoint
is a VkDataGraphPipelineSessionBindPointARM specifying the data graph pipeline session bind point being required. -
bindPointType
is a VkDataGraphPipelineSessionBindPointTypeARM specifying the type of object required forbindPoint
. -
numObjects
is the number of objects required forbindPoint
.
Implementations must always return 1 for numObjects
if
bindPoint
is one of the following bind points:
-
VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TRANSIENT_ARM
Possible values of VkDataGraphPipelineSessionBindPointARM
, specifying
the bind point of a data graph pipeline session, are:
// Provided by VK_ARM_data_graph
typedef enum VkDataGraphPipelineSessionBindPointARM {
VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TRANSIENT_ARM = 0,
} VkDataGraphPipelineSessionBindPointARM;
-
VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TRANSIENT_ARM
corresponds to the transient data produced and consumed during one dispatch of a data graph pipeline in a data graph pipeline session. This transient data is never reused by subsequent dispatches and can safely be clobbered once a vkCmdDispatchDataGraphARM command completes execution.
Possible values of VkDataGraphPipelineSessionBindPointTypeARM
,
specifying the type of a bind point of a data graph pipeline session, are:
// Provided by VK_ARM_data_graph
typedef enum VkDataGraphPipelineSessionBindPointTypeARM {
VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TYPE_MEMORY_ARM = 0,
} VkDataGraphPipelineSessionBindPointTypeARM;
-
VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TYPE_MEMORY_ARM
corresponds to a memory allocation.
To determine the memory requirements for a data graph pipeline session, call:
// Provided by VK_ARM_data_graph
void vkGetDataGraphPipelineSessionMemoryRequirementsARM(
VkDevice device,
const VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfo,
VkMemoryRequirements2* pMemoryRequirements);
-
device
is the logical device that owns the data graph pipeline session. -
pInfo
is a pointer to a VkDataGraphPipelineSessionMemoryRequirementsInfoARM structure containing parameters for the memory requirements query. -
pMemoryRequirements
is a pointer to a VkMemoryRequirements2 structure in which the memory requirements of the data graph pipeline session object are returned.
The VkDataGraphPipelineSessionMemoryRequirementsInfoARM
structure is
defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineSessionMemoryRequirementsInfoARM {
VkStructureType sType;
const void* pNext;
VkDataGraphPipelineSessionARM session;
VkDataGraphPipelineSessionBindPointARM bindPoint;
uint32_t objectIndex;
} VkDataGraphPipelineSessionMemoryRequirementsInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
session
is the data graph pipeline session to query. -
bindPoint
is the bind point of a data graph pipeline session for which memory requirements are being queried. -
objectIndex
is the index of the object whose memory requirements are being queried.
To attach memory to a data graph pipeline session object, call:
// Provided by VK_ARM_data_graph
VkResult vkBindDataGraphPipelineSessionMemoryARM(
VkDevice device,
uint32_t bindInfoCount,
const VkBindDataGraphPipelineSessionMemoryInfoARM* pBindInfos);
-
device
is the logical device that owns the data graph pipeline session and memory. -
bindInfoCount
is the length of thepBindInfos
array. -
pBindInfos
is a pointer to an array of VkBindDataGraphPipelineSessionMemoryInfoARM structures describing graph pipeline sessions and memory to bind.
The VkBindDataGraphPipelineSessionMemoryInfoARM
structure is defined
as:
// Provided by VK_ARM_data_graph
typedef struct VkBindDataGraphPipelineSessionMemoryInfoARM {
VkStructureType sType;
const void* pNext;
VkDataGraphPipelineSessionARM session;
VkDataGraphPipelineSessionBindPointARM bindPoint;
uint32_t objectIndex;
VkDeviceMemory memory;
VkDeviceSize memoryOffset;
} VkBindDataGraphPipelineSessionMemoryInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
session
is the data graph pipeline session to be attached to memory. -
bindPoint
is the data graph pipeline session bind point to whichmemory
is to be attached. -
objectIndex
is the index of the object forbindPoint
at whichmemory
is to be attached. -
memory
is a VkDeviceMemory object describing the device memory to attach. -
memoryOffset
is the start offset of the resion ofmemory
which is to be bound to the data graph pipeline session.
To destroy a data graph pipeline session, call:
// Provided by VK_ARM_data_graph
void vkDestroyDataGraphPipelineSessionARM(
VkDevice device,
VkDataGraphPipelineSessionARM session,
const VkAllocationCallbacks* pAllocator);
-
device
is the logical device that destroys the data graph pipeline session. -
session
is the handle of the data graph pipeline session to destroy. -
pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Dispatch
To record a data graph pipeline dispatch, call:
// Provided by VK_ARM_data_graph
void vkCmdDispatchDataGraphARM(
VkCommandBuffer commandBuffer,
VkDataGraphPipelineSessionARM session,
const VkDataGraphPipelineDispatchInfoARM* pInfo);
-
commandBuffer
is the command buffer into which the command will be recorded. -
session
is the VkDataGraphPipelineSessionARM that data graph pipeline being dispatched will use. -
pInfo
isNULL
or a pointer to a VkDataGraphPipelineDispatchInfoARM structure.
The VkDataGraphPipelineDispatchInfoARM structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineDispatchInfoARM {
VkStructureType sType;
void* pNext;
VkDataGraphPipelineDispatchFlagsARM flags;
} VkDataGraphPipelineDispatchInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
flags
is a bitmask of VkDataGraphPipelineDispatchFlagBitsARM describing additional parameters of the dispatch.
Bits which can be set in
VkDataGraphPipelineDispatchInfoARM::flags
, specifying additional
parameters of a data graph pipeline dispatch, are:
// Provided by VK_ARM_data_graph
// Flag bits for VkDataGraphPipelineDispatchFlagBitsARM
typedef VkFlags64 VkDataGraphPipelineDispatchFlagBitsARM;
// Provided by VK_ARM_data_graph
typedef VkFlags64 VkDataGraphPipelineDispatchFlagsARM;
VkDataGraphPipelineDispatchFlagsARM
is a bitmask type for setting a
mask of zero or more VkDataGraphPipelineDispatchFlagBitsARM.
Properties
To query the properties of a data graph pipeline that can be obtained, call:
// Provided by VK_ARM_data_graph
VkResult vkGetDataGraphPipelineAvailablePropertiesARM(
VkDevice device,
const VkDataGraphPipelineInfoARM* pPipelineInfo,
uint32_t* pPropertiesCount,
VkDataGraphPipelinePropertyARM* pProperties);
-
device
is the logical device that created the data graph pipeline. -
pPipelineInfo
is a VkDataGraphPipelineInfoARM that describes the VkPipeline being queried. -
pPropertiesCount
is a pointer to an integer related to the number of properties available or queried, as described below. -
pProperties
is eitherNULL
or a pointer to an array of VkDataGraphPipelinePropertyARM enums.
If pProperties
is NULL
, then the number of properties associated
with the data graph pipeline is returned in pPropertiesCount
.
Otherwise, pPropertiesCount
must point to a variable set by the user
to the number of elements in the pProperties
array, and on return the
variable is overwritten with the number of enums actually written to
pProperties
.
If pPropertiesCount
is less than the number of properties associated
with the data graph pipeline, at most pPropertiesCount
structures will
be written, and VK_INCOMPLETE
will be returned instead of
VK_SUCCESS
, to indicate that not all the available properties were
returned.
To query properties of a data graph pipeline, call:
// Provided by VK_ARM_data_graph
VkResult vkGetDataGraphPipelinePropertiesARM(
VkDevice device,
const VkDataGraphPipelineInfoARM* pPipelineInfo,
uint32_t propertiesCount,
VkDataGraphPipelinePropertyQueryResultARM* pProperties);
-
device
is the logical device that created the data graph pipeline. -
pPipelineInfo
is a VkDataGraphPipelineInfoARM that describes the VkPipeline being queried. -
propertiesCount
is the length of thepProperties
array. -
pProperties
is a pointer to an array of VkDataGraphPipelinePropertyQueryResultARM structures.
The VkDataGraphPipelineInfoARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelineInfoARM {
VkStructureType sType;
const void* pNext;
VkPipeline dataGraphPipeline;
} VkDataGraphPipelineInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
dataGraphPipeline
is a VkPipeline handle.
The VkDataGraphPipelinePropertyQueryResultARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphPipelinePropertyQueryResultARM {
VkStructureType sType;
const void* pNext;
VkDataGraphPipelinePropertyARM property;
VkBool32 isText;
size_t dataSize;
void* pData;
} VkDataGraphPipelinePropertyQueryResultARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
property
is a VkDataGraphPipelinePropertyARM specifying the property of the data graph pipeline being queried. -
isText
specifies whether the returned data is text or opaque data. IfisText
isVK_TRUE
then the data returned inpData
is text and guaranteed to be a null-terminated UTF-8 string. -
dataSize
is an integer related to the size, in bytes, of the data, as described below. -
pData
is eitherNULL
or a pointer to a block of memory into which the implementation will return the property data.
If pData
is NULL
, then the size, in bytes, of the property data is
returned in dataSize
.
Otherwise, dataSize
must be the size of the buffer, in bytes, pointed
to by pData
and on return dataSize
is overwritten with the
number of bytes of data actually written to pData
including any
trailing NUL character.
If dataSize
is less than the size, in bytes, of the property data, at
most dataSize
bytes of data will be written to pData
, and
VK_INCOMPLETE
will be returned by
vkGetDataGraphPipelinePropertiesARM instead of VK_SUCCESS
, to
indicate that not all the available property data was returned.
If isText
is VK_TRUE
and pData
is not NULL
and
dataSize
is not zero, the last byte written to pData
will be a
NUL character.
Possible values of
VkDataGraphPipelinePropertyQueryResultARM::property
, specifying
the property of the data graph pipeline being queried, are:
// Provided by VK_ARM_data_graph
typedef enum VkDataGraphPipelinePropertyARM {
VK_DATA_GRAPH_PIPELINE_PROPERTY_CREATION_LOG_ARM = 0,
VK_DATA_GRAPH_PIPELINE_PROPERTY_IDENTIFIER_ARM = 1,
} VkDataGraphPipelinePropertyARM;
-
VK_DATA_GRAPH_PIPELINE_PROPERTY_CREATION_LOG_ARM
corresponds to a human-readable log produced during the creation of a data graph pipeline. It may contain information about errors encountered during the creation or other information generally useful for debugging. This property can be queried for any data graph pipeline. -
VK_DATA_GRAPH_PIPELINE_PROPERTY_IDENTIFIER_ARM
corresponds to an opaque identifier for the data graph pipeline. It can be used to create a graph pipeline from a pipeline cache without the need to provide any creation data beyond the identifier, using a VkDataGraphPipelineIdentifierCreateInfoARM structure.
Processing Engines
Data graph pipelines execute on one or more data graph processing engines.
Each queue family of a VkPhysicalDevice that supports
VK_QUEUE_DATA_GRAPH_BIT_ARM
may provide access to processing engines.
Processing engines may be foreign.
Foreign processing engines require the use of external memory and semaphores
to exchange data and synchronize with data graph pipelines that target them.
Each processing engine may support a selection of graph operations.
There exists a default processing engine that enables implementations to
support some operations without tying support to specific processing
engines.
This allows implementations to avoid being specific about the processing
engines that they use internally or to remove the necessity for applications
to choose the specific processing engine used to execute a given set of
operations.
To query the properties of a data graph processing engine for a specific queue family of a physical device, call:
// Provided by VK_ARM_data_graph
void vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM* pQueueFamilyDataGraphProcessingEngineInfo,
VkQueueFamilyDataGraphProcessingEnginePropertiesARM* pQueueFamilyDataGraphProcessingEngineProperties);
-
physicalDevice
is the physical device to query. -
pQueueFamilyDataGraphProcessingEngineInfo
is a pointer to a VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM structure that specifies the data graph processing engine and queue family to query. -
pQueueFamilyDataGraphProcessingEngineProperties
is a pointer to a VkQueueFamilyDataGraphProcessingEnginePropertiesARM structure in which the queries properties are returned.
The VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM {
VkStructureType sType;
const void* pNext;
uint32_t queueFamilyIndex;
VkPhysicalDeviceDataGraphProcessingEngineTypeARM engineType;
} VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
queueFamilyIndex
specifies the queue family being queried. -
engineType
is a VkPhysicalDeviceDataGraphProcessingEngineTypeARM specifying the engine type whose properties are being queried.
The VkQueueFamilyDataGraphProcessingEnginePropertiesARM
structure is
defined as:
// Provided by VK_ARM_data_graph
typedef struct VkQueueFamilyDataGraphProcessingEnginePropertiesARM {
VkStructureType sType;
const void* pNext;
VkExternalSemaphoreHandleTypeFlags foreignSemaphoreHandleTypes;
VkExternalMemoryHandleTypeFlags foreignMemoryHandleTypes;
} VkQueueFamilyDataGraphProcessingEnginePropertiesARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
foreignSemaphoreHandleTypes
is a VkExternalSemaphoreHandleTypeFlags that describes the external semaphore handle types supported by a foreign data graph processing engine. -
foreignMemoryHandleTypes
is a VkExternalMemoryHandleTypeFlags that describes the external memory handle types supported by a foreign data graph processing engine.
The VkPhysicalDeviceDataGraphProcessingEngineARM
structure is defined
as:
// Provided by VK_ARM_data_graph
typedef struct VkPhysicalDeviceDataGraphProcessingEngineARM {
VkPhysicalDeviceDataGraphProcessingEngineTypeARM type;
VkBool32 isForeign;
} VkPhysicalDeviceDataGraphProcessingEngineARM;
-
type
is a VkPhysicalDeviceDataGraphProcessingEngineTypeARM that specifies the type of the processing engine. -
isForeign
specifies whether the processing engine is foreign.
The defined data graph processing engines are:
// Provided by VK_ARM_data_graph
typedef enum VkPhysicalDeviceDataGraphProcessingEngineTypeARM {
VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM = 0,
} VkPhysicalDeviceDataGraphProcessingEngineTypeARM;
-
VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM
corresponds to the default data graph processing engine.
The VkDataGraphProcessingEngineCreateInfoARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkDataGraphProcessingEngineCreateInfoARM {
VkStructureType sType;
const void* pNext;
uint32_t processingEngineCount;
VkPhysicalDeviceDataGraphProcessingEngineARM* pProcessingEngines;
} VkDataGraphProcessingEngineCreateInfoARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
processingEngineCount
is the number of elements inpProcessingEngines
. -
pProcessingEngines
is a pointer to an array ofprocessingEngineCount
VkPhysicalDeviceDataGraphProcessingEngineARM structures.
Operations
Data graph processing engines execute data graph operations. Operations may be of a fixed-function nature, configurable or not, or may , for example, be provided as part of a SPIR-V extended instruction set.
To query the data graph processing engines and operations they support for a specific queue family of a physical device, call:
// Provided by VK_ARM_data_graph
VkResult vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
uint32_t* pQueueFamilyDataGraphPropertyCount,
VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties);
-
physicalDevice
is the physical device to query. -
queueFamilyIndex
is the index of the queue family being queried. -
pQueueFamilyDataGraphPropertyCount
is a pointer to an integer related to the number of properties available or queried. -
pQueueFamilyDataGraphProperties
is eitherNULL
or a pointer to an array of VkQueueFamilyDataGraphPropertiesARM structures.
If pQueueFamilyDataGraphProperties
is NULL
, then the number of
properties available is returned in
pQueueFamilyDataGraphPropertyCount
.
Otherwise, pQueueFamilyDataGraphPropertyCount
must point to a
variable set by the application to the number of elements in the
pQueueFamilyDataGraphProperties
array, and on return the variable is
overwritten with the number of structures actually written to
pQueueFamilyDataGraphProperties
.
If pQueueFamilyDataGraphPropertyCount
is less than the number of
properties available, at most pQueueFamilyDataGraphPropertyCount
structures will be written, and VK_INCOMPLETE
will be returned instead
of VK_SUCCESS
, to indicate that not all the available properties were
returned.
The VkQueueFamilyDataGraphPropertiesARM
structure is defined as:
// Provided by VK_ARM_data_graph
typedef struct VkQueueFamilyDataGraphPropertiesARM {
VkStructureType sType;
const void* pNext;
VkPhysicalDeviceDataGraphProcessingEngineARM engine;
VkPhysicalDeviceDataGraphOperationSupportARM operation;
} VkQueueFamilyDataGraphPropertiesARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
engine
is a VkPhysicalDeviceDataGraphProcessingEngineARM structure describing a data graph processing engine. -
operation
is a VkPhysicalDeviceDataGraphOperationSupportARM structure describing one or more operations supported by a data graph processing engine.
The VkPhysicalDeviceDataGraphOperationSupportARM
structure is defined
as:
// Provided by VK_ARM_data_graph
typedef struct VkPhysicalDeviceDataGraphOperationSupportARM {
VkPhysicalDeviceDataGraphOperationTypeARM operationType;
char name[VK_MAX_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_SET_NAME_SIZE_ARM];
uint32_t version;
} VkPhysicalDeviceDataGraphOperationSupportARM;
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
operationType
is a VkPhysicalDeviceDataGraphOperationTypeARM enum specifying the type of the operation whose support is being described. -
name
is a pointer to a null-terminated UTF-8 string specifying the name of the operation whose support is being described. -
version
is an integer specifying the version of the operation whose support is being described.
The defined data graph operations are:
// Provided by VK_ARM_data_graph
typedef enum VkPhysicalDeviceDataGraphOperationTypeARM {
VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_SPIRV_EXTENDED_INSTRUCTION_SET_ARM = 0,
} VkPhysicalDeviceDataGraphOperationTypeARM;
-
VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_SPIRV_EXTENDED_INSTRUCTION_SET_ARM
corresponds to operations provided by a SPIR-V extended instruction set.