From 7d04dd7138af9837580b976535c8dfb188725deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 14 Jan 2015 13:20:14 +0200 Subject: [PATCH] mesa: support GL_RGB for GL_EXT_texture_type_2_10_10_10_REV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 8ec6534 changed texture upload path and the way how texture format is being checked, this commit adds support for GL_RGB with GL_UNSIGNED_INT_2_10_10_10_REV as specified by extension EXT_texture_type_2_10_10_10_REV specification. Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88385 --- src/mesa/main/glformats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 3e913ed..e54bb90 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2666,7 +2666,8 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type) return MESA_FORMAT_A2R10G10B10_UINT; break; case GL_UNSIGNED_INT_2_10_10_10_REV: - if (format == GL_RGBA) + if (format == GL_RGB || /* GL_EXT_texture_type_2_10_10_10_REV */ + format == GL_RGBA) return MESA_FORMAT_R10G10B10A2_UNORM; else if (format == GL_RGBA_INTEGER) return MESA_FORMAT_R10G10B10A2_UINT; -- 1.9.3