summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2013-04-17 16:30:59 -0700
committerJordan Justen <jordan.l.justen@intel.com>2013-06-02 20:39:38 -0700
commit6bfd897fc432590ea50231845608239fb1d60114 (patch)
tree38e73a3ba0db34951002ed635b87fe3201555df0 /src/mesa/main/texformat.c
parent6a5469cff9eb8167a9cf977b42bdcf423e400bb7 (diff)
downloadexternal_mesa3d-6bfd897fc432590ea50231845608239fb1d60114.zip
external_mesa3d-6bfd897fc432590ea50231845608239fb1d60114.tar.gz
external_mesa3d-6bfd897fc432590ea50231845608239fb1d60114.tar.bz2
mesa/texformat: add _mesa_tex_target_is_array function
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
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 241e2bf..495a204 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;
+ }
+}