softpipe: don't use 3-component formats
authorBrian Paul <brianp@vmware.com>
Tue, 28 Jul 2015 21:59:36 +0000 (15:59 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 10 Jun 2016 21:50:04 +0000 (15:50 -0600)
commitd8fe6332d8e0a0051c0bc76e5085a928a6fd10cd
treed50a63019d09155b85b79e7bd068b9f4f971a641
parente295b4e800a0595f96d775ebd383b8a358f8fdbc
softpipe: don't use 3-component formats

Mesa and gallium don't have a complete set of matching 3-component
texture formats.  For example, 8-bit sRGB unorm.  To fully support
the GL_ARB_copy_image extension we need to have support for all of
these formats: RGB8_UNORM, RGB8_SNORM, RGB8_SRGB, RGB8_UINT, and
RGB8_SINT using the same component order.  Since we don't have that,
disable the 3-component formats for now.

v2: Simplify 3-component format check, per Marek.
Also check that target != PIPE_BUFFER.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/softpipe/sp_screen.c