compiler, intel: Add gl_shader_stage_is_mesh()

And replace the previous Intel-specific function.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14823>
This commit is contained in:
Caio Oliveira 2022-01-28 13:23:21 -08:00 committed by Marge Bot
parent f917c73528
commit 8bab8f6422
3 changed files with 8 additions and 7 deletions

View file

@ -72,6 +72,13 @@ gl_shader_stage_is_compute(gl_shader_stage stage)
return stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_KERNEL;
}
static inline bool
gl_shader_stage_is_mesh(gl_shader_stage stage)
{
return stage == MESA_SHADER_TASK ||
stage == MESA_SHADER_MESH;
}
static inline bool
gl_shader_stage_uses_workgroup(gl_shader_stage stage)
{

View file

@ -137,12 +137,6 @@ brw_shader_stage_is_bindless(gl_shader_stage stage)
stage <= MESA_SHADER_CALLABLE;
}
static inline bool
brw_shader_stage_is_mesh(gl_shader_stage stage)
{
return stage == MESA_SHADER_TASK || stage == MESA_SHADER_MESH;
}
/**
* Program key structures.
*

View file

@ -160,7 +160,7 @@ emit_system_values_block(nir_block *block, fs_visitor *v)
/* For Task/Mesh, draw_id will be handled later in
* nir_emit_mesh_task_intrinsic().
*/
if (!brw_shader_stage_is_mesh(v->stage))
if (!gl_shader_stage_is_mesh(v->stage))
unreachable("should be lowered by brw_nir_lower_vs_inputs().");
break;