From c5cf16a4fcf64eb1f6b5923e0d46b3f7dfee23a9 Mon Sep 17 00:00:00 2001 From: Eduardo Lima Mitev Date: Tue, 12 Jan 2016 19:36:20 +0100 Subject: mesa/teximage: add _mesa_is_cube_map_texture utility method Reviewed-by: Dave Airlie --- src/mesa/main/teximage.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mesa/main/teximage.c') diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 78d5b55e681..616a92953e7 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -242,6 +242,24 @@ _mesa_is_array_texture(GLenum target) }; } +/** + * Test if a target is a cube map. + * + * \param target texture target. + * + * \return true if the target is a cube map, false otherwise. + */ +bool +_mesa_is_cube_map_texture(GLenum target) +{ + switch(target) { + case GL_TEXTURE_CUBE_MAP: + case GL_TEXTURE_CUBE_MAP_ARRAY: + return true; + default: + return false; + } +} /** * Return the proxy target which corresponds to the given texture target -- cgit v1.2.3