From 10d81f466794c61c11225c94b2125bf2dd23748e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 31 Aug 2009 19:26:00 -0600 Subject: mesa: added _mesa_is_stencil_format() --- src/mesa/main/image.c | 16 ++++++++++++++++ src/mesa/main/image.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index d77c593ac7..006a55116b 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -688,6 +688,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. */ diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index 20459a5f1e..a082f37457 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -63,6 +63,9 @@ _mesa_is_index_format(GLenum format); extern GLboolean _mesa_is_depth_format(GLenum format); +extern GLboolean +_mesa_is_stencil_format(GLenum format); + extern GLboolean _mesa_is_ycbcr_format(GLenum format); -- cgit v1.2.3