diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/image.c | 16 | ||||
-rw-r--r-- | src/mesa/main/image.h | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index d77c593ac7c..006a55116bc 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -689,6 +689,22 @@ _mesa_is_depth_format(GLenum format) /** + * Test if the given image format is a stencil format. + */ +GLboolean +_mesa_is_stencil_format(GLenum format) +{ + switch (format) { + case GL_STENCIL_INDEX: + case GL_DEPTH_STENCIL: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** * Test if the given image format is a YCbCr format. */ GLboolean diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index 20459a5f1e1..a082f374571 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -64,6 +64,9 @@ extern GLboolean _mesa_is_depth_format(GLenum format); extern GLboolean +_mesa_is_stencil_format(GLenum format); + +extern GLboolean _mesa_is_ycbcr_format(GLenum format); extern GLboolean |