case GL_COMPUTE_SHADER:
return MESA_SHADER_COMPUTE;
default:
- assert(0 && "bad value in _mesa_shader_enum_to_shader_stage()");
- return MESA_SHADER_VERTEX;
+ unreachable("bad value in _mesa_shader_enum_to_shader_stage()");
}
}
_mesa_shader_stage_from_subroutine_uniform(GLenum subuniform)
{
switch (subuniform) {
- default:
case GL_VERTEX_SUBROUTINE_UNIFORM:
return MESA_SHADER_VERTEX;
case GL_GEOMETRY_SUBROUTINE_UNIFORM:
case GL_TESS_EVALUATION_SUBROUTINE_UNIFORM:
return MESA_SHADER_TESS_EVAL;
}
+ unreachable("not reached");
}
static inline gl_shader_stage
case GL_TESS_EVALUATION_SUBROUTINE:
return MESA_SHADER_TESS_EVAL;
}
+ unreachable("not reached");
}
static inline GLenum
_mesa_shader_stage_to_subroutine(gl_shader_stage stage)
{
switch (stage) {
- default:
case MESA_SHADER_VERTEX:
return GL_VERTEX_SUBROUTINE;
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_TESS_EVAL:
return GL_TESS_EVALUATION_SUBROUTINE;
}
+ unreachable("not reached");
}
static inline GLenum
_mesa_shader_stage_to_subroutine_uniform(gl_shader_stage stage)
{
switch (stage) {
- default:
case MESA_SHADER_VERTEX:
return GL_VERTEX_SUBROUTINE_UNIFORM;
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_TESS_EVAL:
return GL_TESS_EVALUATION_SUBROUTINE_UNIFORM;
}
+ unreachable("not reached");
}
extern bool