_mesa_free_shader_state(struct gl_context *ctx);
-static inline gl_shader_type
-_mesa_shader_type_to_index(GLenum v)
+static inline gl_shader_stage
+_mesa_shader_enum_to_shader_stage(GLenum v)
{
switch (v) {
case GL_VERTEX_SHADER:
return MESA_SHADER_FRAGMENT;
case GL_GEOMETRY_SHADER:
return MESA_SHADER_GEOMETRY;
+ case GL_COMPUTE_SHADER:
+ return MESA_SHADER_COMPUTE;
default:
- ASSERT(0 && "bad value in _mesa_shader_type_to_index()");
- return MESA_SHADER_TYPES;
+ ASSERT(0 && "bad value in _mesa_shader_enum_to_shader_stage()");
+ return MESA_SHADER_VERTEX;
}
}
-static inline GLenum
-_mesa_shader_index_to_type(GLuint i)
-{
- static const GLenum enums[MESA_SHADER_TYPES] = {
- GL_VERTEX_SHADER,
- GL_GEOMETRY_SHADER,
- GL_FRAGMENT_SHADER
- };
- if (i >= MESA_SHADER_TYPES)
- return 0;
- else
- return enums[i];
-}
-
-
#ifdef __cplusplus
}
#endif