From e485af774efba897dcbef4697158428c2298d964 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 27 Apr 2010 09:31:19 -0600 Subject: mesa: move/rename is_depth_or_stencil_format() Put it with other, similar functions. --- src/mesa/main/image.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/mesa/main/image.c') diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 8aef306fd8..93b01423dc 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -734,6 +734,32 @@ _mesa_is_depthstencil_format(GLenum format) } } + +/** + * Test if the given image format is a depth or stencil format. + */ +GLboolean +_mesa_is_depth_or_stencil_format(GLenum format) +{ + switch (format) { + case GL_DEPTH_COMPONENT: + case GL_DEPTH_COMPONENT16: + case GL_DEPTH_COMPONENT24: + case GL_DEPTH_COMPONENT32: + case GL_STENCIL_INDEX: + case GL_STENCIL_INDEX1_EXT: + case GL_STENCIL_INDEX4_EXT: + case GL_STENCIL_INDEX8_EXT: + case GL_STENCIL_INDEX16_EXT: + case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH24_STENCIL8_EXT: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + /** * Test if the given image format is a dudv format. */ -- cgit v1.2.3