mesa: Don't allow snorm internal formats in glCopyTexImage*() in GLES3
[mesa.git] / src / mesa / main / shaderobj.h
index 5ce85cfdeba052f89ee15c0ba328bdccd9b215ee..fae8be827c52872d472a71f7b6e00fa825f5ff32 100644 (file)
@@ -101,8 +101,8 @@ extern void
 _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:
@@ -111,28 +111,15 @@ _mesa_shader_type_to_index(GLenum v)
       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_FRAGMENT_SHADER,
-      GL_GEOMETRY_SHADER ,
-   };
-   if (i >= MESA_SHADER_TYPES)
-      return 0;
-   else
-      return enums[i];
-}
-
-
 #ifdef __cplusplus
 }
 #endif