Commit cf85ef16 authored by Anuj Phogat's avatar Anuj Phogat
Browse files

mesa: Account for astc 3d formats in _mesa_is_astc_format()


Signed-off-by: Anuj Phogat's avatarAnuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
parent 38cd8145
...@@ -823,10 +823,10 @@ _mesa_is_enum_format_signed_int(GLenum format) ...@@ -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 static bool
_mesa_is_astc_format(GLenum internalFormat) is_astc_2d_format(GLenum internalFormat)
{ {
switch (internalFormat) { switch (internalFormat) {
case GL_COMPRESSED_RGBA_ASTC_4x4_KHR: case GL_COMPRESSED_RGBA_ASTC_4x4_KHR:
...@@ -896,6 +896,16 @@ is_astc_3d_format(GLenum internalFormat) ...@@ -896,6 +896,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. * Test if the given format is an integer (non-normalized) format.
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment