mesa: Make _mesa_GetActiveAttribARB use the attributes in the shader IR
[mesa.git] / src / mesa / main / texformat.c
index c919a74e0475f0f1635742df42da4723c53e95b8..b763a689a1132d756f6fd22957daae2b35dab3b0 100644 (file)
@@ -197,16 +197,6 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
         RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
         break;
 
-      case GL_COLOR_INDEX:
-      case GL_COLOR_INDEX1_EXT:
-      case GL_COLOR_INDEX2_EXT:
-      case GL_COLOR_INDEX4_EXT:
-      case GL_COLOR_INDEX12_EXT:
-      case GL_COLOR_INDEX16_EXT:
-      case GL_COLOR_INDEX8_EXT:
-        RETURN_IF_SUPPORTED(MESA_FORMAT_CI8);
-        break;
-
       default:
          ; /* fallthrough */
    }
@@ -713,7 +703,9 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
       }
    }
 
-   if (ctx->Extensions.EXT_texture_format_BGRA8888) {
+   /* GL_BGRA can be an internal format *only* in OpenGL ES (1.x or 2.0).
+    */
+   if (ctx->API != API_OPENGL) {
       switch (internalFormat) {
       case GL_BGRA:
         RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);