What: Device::new_mesh_render_pipeline_state(&MeshPipelineDescriptor, sampler_ids) makes a
RenderPipelineState of a mesh descriptor.
- The content is compiled with compile_mesh_pipeline at each creation. The translator gives no
key of a mesh descriptor before its compile, so neither the map of contents nor the cache
directory holds one.
- The draw tables become four: VERTEX, FRAGMENT, OBJECT and MESH, in Draws, OffsetLayout and the
render encoder's tables, blocks and dirty offsets.
- draws() maps the object stage (or the launcher) and the mesh stage to their tables, takes their
threadgroup facts, and maps DispatchRegion, GroupCountsAddress (new FieldValue::GroupCounts) and
the mesh stage's layer and viewport counts.
- MeshThreads holds each stage's answer: the translator's stated maximum capped by
maxTask/MeshWorkGroupInvocations and maxTask/MeshWorkGroupSize[0]. Its workgroup is that answer
in one row, rounded up to the stages' LocalSizeConstraint multiple.
- stage_module specializes ObjectLocalSize/ObjectFlatLocalSize, with ObjectMultiRegion 1, and
LocalSize/FlatLocalSize, with MultiRegion 0, to the two workgroups. A threadgroup memory length
stays refused.
- make() gives a mesh pipeline no vertex input or input assembly, and drops PRIMITIVE_TOPOLOGY and
PRIMITIVE_RESTART_ENABLE from its dynamic states (VUID-VkGraphicsPipelineCreateInfo-
pDynamicStates-07065 and -07066).
- The state answers maxTotalThreadsPerObjectThreadgroup, maxTotalThreadsPerMeshThreadgroup,
objectThreadExecutionWidth and meshThreadExecutionWidth (32), maxTotalThreadgroupsPerMeshGrid
(the descriptor's, else 1,048,576) and both required sizes. A state without an object function
answers 0 for its object stage, as docs/API.md's accepted differences say.
- New Refusal::MeshDraw (basis: ours) refuses a draw of primitives or patches, or an execution of
an indirect command buffer, with a mesh state (VUID-vkCmdDraw-stage-06481). The encoder records
no mesh draw yet; that is the next step.
- The runtime re-exports MeshPipelineDescriptor.
Why: step 2 of the ruled order (floor, state, direct, indirect, ICB, adapter), under the planner's
cap ruling: a made state answers the capped maxima.
Docs: the README's known gap now says mesh states are made and not drawn, each creation compiles,
threadgroup memory arguments are refused, and the maxima are capped. The stale identity-domains
bullet for object and mesh functions is deleted: 2761e27594 removed that refusal. docs/API.md is
updated. docs/REFUSALS.md and error/basis.rs are regenerated. api_signatures.tsv is blessed: new
runtime methods, the refusal and the re-export, with nothing removed.
Tests: tests::mesh_state, under a device cfg, on every device of the cfg's kind. Where the device
has the mesh set:
- mesh_pipeline_limits' four states (nothing stated; 64, 32 and grid 8; without an object
function, with and without grid 8) are made with their VkPipeline and answer the capped maxima;
- a draw of primitives with one is Refusal::MeshDraw;
- mesh_draws' rasterizing states into two RGBA32Uint colours, with and without the object
function, make their VkPipeline.
Elsewhere each state is refused naming MeshShading.