mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 02:00:12 +01:00
mesa: Add a helper function is_astc_3d_format()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
72dfe0242d
commit
38cd8145a8
1 changed files with 32 additions and 0 deletions
|
|
@ -863,6 +863,38 @@ _mesa_is_astc_format(GLenum internalFormat)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if the given format is an ASTC 3D format.
|
||||
*/
|
||||
static bool
|
||||
is_astc_3d_format(GLenum internalFormat)
|
||||
{
|
||||
switch (internalFormat) {
|
||||
case GL_COMPRESSED_RGBA_ASTC_3x3x3_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_4x3x3_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_4x4x3_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_4x4x4_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_5x4x4_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_5x5x4_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_5x5x5_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_6x5x5_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_6x6x5_OES:
|
||||
case GL_COMPRESSED_RGBA_ASTC_6x6x6_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES:
|
||||
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if the given format is an integer (non-normalized) format.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue