compiler: Extract num_mesh_vertices_per_primitive function.

Prevent code duplication.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15005>
This commit is contained in:
Timur Kristóf
2022-02-14 10:44:28 +01:00
parent 32155851f1
commit 0445802ab2
4 changed files with 24 additions and 19 deletions

View File

@@ -1045,6 +1045,11 @@ enum shader_prim
SHADER_PRIM_UNKNOWN = (SHADER_PRIM_MAX * 2),
};
/**
* Number of vertices per mesh shader primitive.
*/
unsigned num_mesh_vertices_per_primitive(unsigned prim);
/**
* A compare function enum for use in compiler lowering passes. This is in
* the same order as GL's compare functions (shifted down by GL_NEVER), and is