diff options
author | Iago Toral Quiroga <[email protected]> | 2015-02-10 16:40:43 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2015-02-24 08:58:53 +0100 |
commit | 4db4a559adcad494cdd17d378602b4b97a51d2b8 (patch) | |
tree | 130cdb7f86cc3df1bc1076f13fa34468a7d3d8d0 /src/mesa/main/teximage.c | |
parent | 2aa71e9485a5a062b1bd2dd8bdc081a8fa4c873d (diff) |
mesa: Add _mesa_is_array_texture helper
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index c65d6ab7e9e..81a3f1515c2 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -739,6 +739,28 @@ _mesa_is_proxy_texture(GLenum target) /** + * Test if a target is an array target. + * + * \param target texture target. + * + * \return true if the target is an array target, false otherwise. + */ +bool +_mesa_is_array_texture(GLenum target) +{ + switch (target) { + case GL_TEXTURE_1D_ARRAY: + case GL_TEXTURE_2D_ARRAY: + case GL_TEXTURE_CUBE_MAP_ARRAY: + case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: + return true; + default: + return false; + }; +} + + +/** * Return the proxy target which corresponds to the given texture target */ static GLenum |