Skip to content

anv: Prepare Graphics Pipeline to have different variations

The Graphics Pipeline have two variants, based on how geometry is handled, as the Vulkan spec says:

The geometric primitive processing can either be handled on a per primitive basis by the vertex, tessellation, and geometry shader stages, or on a per mesh basis using task and mesh shader stages. If the pipeline includes a mesh shader stage, it uses the mesh pipeline, otherwise it uses the primitive pipeline.

This MR makes sure that the code for Primitive Pipeline is properly separated and guarded, so we can later add the Mesh Pipeline in a similar way.

Since there's enough reuse between the two Graphics Pipeline variants, I've followed the API approach and opted to map it internally to the same anv_graphics_pipeline structure, instead of creating a different one like compute or ray tracing.

Merge request reports