summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/glformats.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-07-08 18:41:03 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2016-07-11 21:17:01 -0400
commit8ee3cdde049d30095451f44080a9cd2d6e949459 (patch)
tree49396094316feb60ad068a509bdd0efcbc3469c6 /src/mesa/main/glformats.c
parent0d911a720da9677ad0410fdfeab8e81546427102 (diff)
downloadexternal_mesa3d-8ee3cdde049d30095451f44080a9cd2d6e949459.zip
external_mesa3d-8ee3cdde049d30095451f44080a9cd2d6e949459.tar.gz
external_mesa3d-8ee3cdde049d30095451f44080a9cd2d6e949459.tar.bz2
mesa: etc2 online compression is unsupported, don't attempt it
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/mesa/main/glformats.c')
-rw-r--r--src/mesa/main/glformats.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 448577e..0c2210a 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -907,6 +907,29 @@ _mesa_is_astc_format(GLenum internalFormat)
}
/**
+ * Test if the given format is an ETC2 format.
+ */
+GLboolean
+_mesa_is_etc2_format(GLenum internalFormat)
+{
+ switch (internalFormat) {
+ case GL_COMPRESSED_RGB8_ETC2:
+ case GL_COMPRESSED_SRGB8_ETC2:
+ case GL_COMPRESSED_RGBA8_ETC2_EAC:
+ case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
+ case GL_COMPRESSED_R11_EAC:
+ case GL_COMPRESSED_RG11_EAC:
+ case GL_COMPRESSED_SIGNED_R11_EAC:
+ case GL_COMPRESSED_SIGNED_RG11_EAC:
+ case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+ case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+ return true;
+ default:
+ return false;
+ }
+}
+
+/**
* Test if the given format is an integer (non-normalized) format.
*/
GLboolean