C Specification
The VkPhysicalDeviceMeshShaderPropertiesEXT structure is defined as:
// Provided by VK_EXT_mesh_shader
typedef struct VkPhysicalDeviceMeshShaderPropertiesEXT {
VkStructureType sType;
void* pNext;
uint32_t maxTaskWorkGroupTotalCount;
uint32_t maxTaskWorkGroupCount[3];
uint32_t maxTaskWorkGroupInvocations;
uint32_t maxTaskWorkGroupSize[3];
uint32_t maxTaskPayloadSize;
uint32_t maxTaskSharedMemorySize;
uint32_t maxTaskPayloadAndSharedMemorySize;
uint32_t maxMeshWorkGroupTotalCount;
uint32_t maxMeshWorkGroupCount[3];
uint32_t maxMeshWorkGroupInvocations;
uint32_t maxMeshWorkGroupSize[3];
uint32_t maxMeshSharedMemorySize;
uint32_t maxMeshPayloadAndSharedMemorySize;
uint32_t maxMeshOutputMemorySize;
uint32_t maxMeshPayloadAndOutputMemorySize;
uint32_t maxMeshOutputComponents;
uint32_t maxMeshOutputVertices;
uint32_t maxMeshOutputPrimitives;
uint32_t maxMeshOutputLayers;
uint32_t maxMeshMultiviewViewCount;
uint32_t meshOutputPerVertexGranularity;
uint32_t meshOutputPerPrimitiveGranularity;
uint32_t maxPreferredTaskWorkGroupInvocations;
uint32_t maxPreferredMeshWorkGroupInvocations;
VkBool32 prefersLocalInvocationVertexOutput;
VkBool32 prefersLocalInvocationPrimitiveOutput;
VkBool32 prefersCompactVertexOutput;
VkBool32 prefersCompactPrimitiveOutput;
} VkPhysicalDeviceMeshShaderPropertiesEXT;
Members
The members of the VkPhysicalDeviceMeshShaderPropertiesEXT structure
describe the following implementation-dependent limits:
Description
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
maxTaskWorkGroupTotalCountis the maximum number of total local workgroups that can be launched by a single mesh tasks drawing command. See https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#drawing-mesh-shading. -
maxTaskWorkGroupCount[3] is the maximum number of local workgroups that can be launched by a single mesh tasks drawing command. These three values represent the maximum number of local workgroups for the X, Y, and Z dimensions, respectively. The workgroup count parameters to the drawing commands must be less than or equal to the corresponding limit. The product of these dimensions must be less than or equal tomaxTaskWorkGroupTotalCount. -
maxTaskWorkGroupInvocationsis the maximum total number of task shader invocations in a single local workgroup. The product of the X, Y, and Z sizes, as specified by theLocalSizeorLocalSizeIdexecution mode in shader modules or by the object decorated by theWorkgroupSizedecoration, must be less than or equal to this limit. -
maxTaskWorkGroupSize[3] is the maximum size of a local task workgroup, per dimension. These three values represent the maximum local workgroup size in the X, Y, and Z dimensions, respectively. Thex,y, andzsizes, as specified by theLocalSizeorLocalSizeIdexecution mode or by the object decorated by theWorkgroupSizedecoration in shader modules, must be less than or equal to the corresponding limit. -
maxTaskPayloadSizeis the maximum total storage size, in bytes, available for variables declared with theTaskPayloadWorkgroupEXTstorage class in shader modules in the task shader stage. -
maxTaskSharedMemorySizeis the maximum total storage size, in bytes, available for variables declared with theWorkgroupstorage class in shader modules in the task shader stage. -
maxTaskPayloadAndSharedMemorySizeis the maximum total storage size, in bytes, available for variables that are declared with theTaskPayloadWorkgroupEXTorWorkgroupstorage class, in shader modules in the task shader stage. -
maxMeshWorkGroupTotalCountis the maximum number of local output tasks a single task shader workgroup can emit. -
maxMeshWorkGroupCount[3] is the maximum number of local output tasks a single task shader workgroup can emit, per dimension. These three values represent the maximum number of local output tasks for the X, Y, and Z dimensions, respectively. The workgroup count parameters to theOpEmitMeshTasksEXTmust be less than or equal to the corresponding limit. The product of these dimensions must be less than or equal tomaxMeshWorkGroupTotalCount. -
maxMeshWorkGroupInvocationsis the maximum total number of mesh shader invocations in a single local workgroup. The product of the X, Y, and Z sizes, as specified by theLocalSizeorLocalSizeIdexecution mode in shader modules or by the object decorated by theWorkgroupSizedecoration, must be less than or equal to this limit. -
maxMeshWorkGroupSize[3] is the maximum size of a local mesh workgroup, per dimension. These three values represent the maximum local workgroup size in the X, Y, and Z dimensions, respectively. Thex,y, andzsizes, as specified by theLocalSizeorLocalSizeIdexecution mode or by the object decorated by theWorkgroupSizedecoration in shader modules, must be less than or equal to the corresponding limit. -
maxMeshSharedMemorySizeis the maximum total storage size, in bytes, available for variables declared with theWorkgroupstorage class in shader modules in the mesh shader stage. -
maxMeshPayloadAndSharedMemorySizeis the maximum total storage size, in bytes, available for variables that are declared with theTaskPayloadWorkgroupEXTorWorkgroupstorage class in shader modules in the mesh shader stage. -
maxMeshOutputMemorySizeis the maximum total storage size, in bytes, available for output variables in shader modules in the mesh shader stage, according to the formula in Mesh Shader Output. -
maxMeshPayloadAndOutputMemorySizeis the maximum total storage size, in bytes, available for variables that are declared with theTaskPayloadWorkgroupEXTstorage class, or output variables in shader modules in the mesh shader stage, according to the formula in Mesh Shader Output. -
maxMeshOutputComponentsis the maximum number of components of output variables which can be output from the mesh shader stage. -
maxMeshOutputVerticesis the maximum number of vertices which can be emitted by a single mesh shader workgroup. -
maxMeshOutputPrimitivesis the maximum number of primitives which can be emitted by a single mesh shader workgroup. -
maxMeshOutputLayersis one greater than the maximum layer index that can be output from the mesh shader stage. -
maxMeshMultiviewViewCountis one greater than the maximum view index that can be used by any mesh shader. -
meshOutputPerVertexGranularityis the granularity of vertex allocation. The number of output vertices allocated for the mesh shader stage is padded to a multiple of this number. The value can be used to calculate the required storage size for output variables in shader modules in the mesh shader stage, which must be less than or equal tomaxMeshOutputMemorySize. -
meshOutputPerPrimitiveGranularityis the granularity of primitive allocation. The number of output primitives allocated for the mesh shader stage is padded to a multiple of this number. The value can be used to calculate the required storage size for output variables in shader modules in the mesh shader stage, which must be less than or equal tomaxMeshOutputMemorySize. -
maxPreferredTaskWorkGroupInvocationsis the maximum number of task shader invocations in a single workgroup that is preferred by the implementation for optimal performance. The value is guaranteed to be a multiple of a supported subgroup size for the task shader stage. -
maxPreferredMeshWorkGroupInvocationsis the maximum number of mesh shader invocations in a single workgroup that is preferred by the implementation for optimal performance. The value is guaranteed to be a multiple of a supported subgroup size for the mesh shader stage. -
prefersLocalInvocationVertexOutputspecifies whether writes to the vertex output array in a mesh shader yield best performance when the array index matchesLocalInvocationIndex. -
prefersLocalInvocationPrimitiveOutputspecifies whether writes to the primitive output array in a mesh shader yield best performance when the array index matchesLocalInvocationIndex. -
prefersCompactVertexOutputspecifies whether output vertices should be compacted after custom culling in the mesh shader for best performance, otherwise keeping the vertices at their original location may be better. -
prefersCompactPrimitiveOutputspecifies whether output primitives should be compacted after custom culling in the mesh shader for best performance, otherwise the use ofCullPrimitiveEXTmay be better.
If the VkPhysicalDeviceMeshShaderPropertiesEXT structure is included
in the pNext chain of VkPhysicalDeviceProperties2, it is filled
with the implementation-dependent limits.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.