diff options
author | Brian Paul <[email protected]> | 2010-04-27 09:31:19 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-04-27 09:31:22 -0600 |
commit | e485af774efba897dcbef4697158428c2298d964 (patch) | |
tree | c404e4bf8e7b90468a366fcdd434ad5f10d98cb5 /src/mesa/main | |
parent | f62c738c627e762f178de54ae273d3f5b6064a05 (diff) |
mesa: move/rename is_depth_or_stencil_format()
Put it with other, similar functions.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/image.c | 26 | ||||
-rw-r--r-- | src/mesa/main/image.h | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 8aef306fd81..93b01423dcf 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. */ diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index 3947bbc2786..48582eb3bbe 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -73,6 +73,9 @@ extern GLboolean _mesa_is_depthstencil_format(GLenum format); extern GLboolean +_mesa_is_depth_or_stencil_format(GLenum format); + +extern GLboolean _mesa_is_dudv_format(GLenum format); extern GLboolean |