is_astc_3d_format(internalFormat)))
return GL_RGBA;
- if (!_mesa_has_MESA_ycbcr_texture(ctx)) {
+ if (_mesa_has_MESA_ycbcr_texture(ctx)) {
if (internalFormat == GL_YCBCR_MESA)
return GL_YCBCR_MESA;
}
bool normalized = false, is_float = false, is_signed = false;
int num_channels = 0, type_size = 0;
+ if (format == GL_COLOR_INDEX)
+ return MESA_FORMAT_NONE;
+
/* Extract array format type information from the OpenGL data type */
switch (type) {
case GL_UNSIGNED_BYTE: