} else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
}
- RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
- RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
- break;
+ /* fallthrough */
case GL_RGBA8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8A8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
/* deep RGBA formats */
case GL_RGB10_A2:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R10G10B10A2_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
}
/* fallthrough */
case GL_RGB8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UNORM8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8X8_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8A8_UNORM);
+
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
case GL_RGB_SNORM:
case GL_RGB8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8X8_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8A8_SNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_X8B8G8R8_SNORM);
- /* FALLTHROUGH */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SNORM);
+ break;
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8A8_SNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8A8_SNORM);
break;
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
+ /* there is no MESA_FORMAT_RGB_SRGB8 */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8X8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8A8_SRGB);
+
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8B8A8_SRGB);
+
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;