Chrome OS would like to import and render to any supported format that has
a corresponding display plane format, and this prevents throwing
framebuffer incomplete for FBOs using these textures.
See: crbug.com/949260
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
image->internal_format != 0 ?
image->internal_format : _mesa_get_format_base_format(mt->format);
- /* Setup a sized internal format for MESA_FORMAT_R10G10B10[X2|A2]_UNORM. */
+ /* Fix the internal format when _mesa_get_format_base_format(mt->format)
+ * isn't a valid one for that particular format.
+ */
if (brw->mesa_format_supports_render[image->format]) {
if (image->format == MESA_FORMAT_R10G10B10A2_UNORM ||
- image->format == MESA_FORMAT_R10G10B10X2_UNORM)
+ image->format == MESA_FORMAT_R10G10B10X2_UNORM ||
+ image->format == MESA_FORMAT_B10G10R10A2_UNORM ||
+ image->format == MESA_FORMAT_B10G10R10X2_UNORM)
internal_format = GL_RGB10_A2;
}