mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 18:00:10 +01:00
mesa: Add helper function _mesa_is_format_integer()
This function will be used in the following patch.
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 3135668254)
This commit is contained in:
parent
657a185dc0
commit
66765bb6a6
2 changed files with 12 additions and 0 deletions
|
|
@ -2012,6 +2012,15 @@ _mesa_is_format_signed(mesa_format format)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the given format an integer format?
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_is_format_integer(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return color encoding for given format.
|
||||
|
|
|
|||
|
|
@ -682,6 +682,9 @@ _mesa_is_format_unsigned(mesa_format format);
|
|||
extern GLboolean
|
||||
_mesa_is_format_signed(mesa_format format);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_format_integer(mesa_format format);
|
||||
|
||||
extern GLenum
|
||||
_mesa_get_format_color_encoding(mesa_format format);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue