mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 16:50:34 +01:00
panfrost: Add shader_stage helper
For Valhall, which specifies these in the shader program descriptor. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15795>
This commit is contained in:
parent
783d27645c
commit
4d04437a3b
1 changed files with 15 additions and 0 deletions
|
|
@ -43,6 +43,21 @@ GENX(pan_shader_compile)(nir_shader *nir,
|
|||
struct util_dynarray *binary,
|
||||
struct pan_shader_info *info);
|
||||
|
||||
#if PAN_ARCH >= 9
|
||||
static inline enum mali_shader_stage
|
||||
pan_shader_stage(const struct pan_shader_info *info)
|
||||
{
|
||||
switch (info->stage) {
|
||||
case MESA_SHADER_VERTEX:
|
||||
return MALI_SHADER_STAGE_VERTEX;
|
||||
case MESA_SHADER_FRAGMENT:
|
||||
return MALI_SHADER_STAGE_FRAGMENT;
|
||||
default:
|
||||
return MALI_SHADER_STAGE_COMPUTE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if PAN_ARCH <= 5
|
||||
static inline void
|
||||
pan_shader_prepare_midgard_rsd(const struct pan_shader_info *info,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue