summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 241e2bfa7fd..495a2048d92 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -820,3 +820,17 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
_mesa_lookup_enum_by_nr(internalFormat));
return MESA_FORMAT_NONE;
}
+
+GLboolean
+_mesa_tex_target_is_array(GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}