aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2016-02-11 12:09:51 -0800
committerAnuj Phogat <[email protected]>2016-05-03 03:43:18 -0700
commitcf85ef1618f5d05a1f4017aec6a9fa81cc935e79 (patch)
tree3109b43a4ef9fead4e56d851b89d5af3202e75d2
parent38cd8145a8050719a4ce8d274ee515ded474be21 (diff)
mesa: Account for astc 3d formats in _mesa_is_astc_format()
Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/main/glformats.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 6f862d7848f..6dcdefc3aaa 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -823,10 +823,10 @@ _mesa_is_enum_format_signed_int(GLenum format)
}
/**
- * Test if the given format is an ASTC format.
+ * Test if the given format is an ASTC 2D format.
*/
-GLboolean
-_mesa_is_astc_format(GLenum internalFormat)
+static bool
+is_astc_2d_format(GLenum internalFormat)
{
switch (internalFormat) {
case GL_COMPRESSED_RGBA_ASTC_4x4_KHR:
@@ -897,6 +897,16 @@ is_astc_3d_format(GLenum internalFormat)
}
/**
+ * Test if the given format is an ASTC format.
+ */
+GLboolean
+_mesa_is_astc_format(GLenum internalFormat)
+{
+ return is_astc_2d_format(internalFormat) ||
+ is_astc_3d_format(internalFormat);
+}
+
+/**
* Test if the given format is an integer (non-normalized) format.
*/
GLboolean