--- src/mesa/main/teximage.c | 18 ++++++++++++++++++ src/mesa/main/teximage.h | 4 ++++ 2 files changed, 22 insertions(+)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 250d758..4cca396 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -256,6 +256,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 diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h index b693ad7..7cd2c42 100644 --- a/src/mesa/main/teximage.h +++ b/src/mesa/main/teximage.h @@ -206,6 +206,10 @@ _mesa_texture_buffer_range(struct gl_context *ctx, struct gl_buffer_object *bufObj, GLintptr offset, GLsizeiptr size, const char *caller); + +bool +_mesa_is_cube_map_texture(GLenum target); + /*@}*/ -- 2.5.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev