compiler: add gl_shader_stage_is_graphics

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36512>
This commit is contained in:
Lionel Landwerlin 2025-04-11 22:49:05 +03:00 committed by Marge Bot
parent a29b9e47b0
commit 83cb02206c

View file

@ -97,6 +97,23 @@ gl_shader_stage_is_mesh(gl_shader_stage stage)
stage == MESA_SHADER_MESH;
}
static inline bool
gl_shader_stage_is_graphics(gl_shader_stage stage)
{
switch (stage) {
case MESA_SHADER_VERTEX:
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_FRAGMENT:
case MESA_SHADER_TASK:
case MESA_SHADER_MESH:
return true;
default:
return false;
}
}
static inline bool
gl_shader_stage_uses_workgroup(gl_shader_stage stage)
{