Browse Source

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>
undefined
Jordan Justen 12 years ago
parent
commit
6bfd897fc4
2 changed files with 16 additions and 0 deletions
  1. 14
    0
      src/mesa/main/texformat.c
  2. 2
    0
      src/mesa/main/texformat.h

+ 14
- 0
src/mesa/main/texformat.c View File

@@ -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;
}
}

+ 2
- 0
src/mesa/main/texformat.h View File

@@ -36,5 +36,7 @@ extern gl_format
_mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
GLint internalFormat, GLenum format, GLenum type);

extern GLboolean
_mesa_tex_target_is_array(GLenum target);

#endif

Loading…
Cancel
Save