summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.h
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2013-12-07 23:35:04 +0100
committerFrancisco Jerez <[email protected]>2014-01-15 16:42:07 +0100
commitd9b0b4e960b07140e5ece4b4ff6a142277408bfb (patch)
tree8100fdfea803f569c06f804d4f748cb8368b9c2b /src/mesa/main/teximage.h
parentbfcf78c1101a1cbcdd9a479722203047c8d6c26a (diff)
mesa: Define helper function to get the number of texture layers.
And to check if it can have layers at all. This will be used by the implementation of ARB_shader_image_load_store. v2: Fix constness of texobj argument, use assert and return reasonable default rather than calling unreachable() in default switch case. Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.h')
-rw-r--r--src/mesa/main/teximage.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 0b5786340b7..80a0a57b505 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -138,6 +138,12 @@ _mesa_tex_target_to_face(GLenum target);
extern GLint
_mesa_get_texture_dimensions(GLenum target);
+extern GLboolean
+_mesa_tex_target_is_layered(GLenum target);
+
+extern GLuint
+_mesa_get_texture_layers(const struct gl_texture_object *texObj, GLint level);
+
extern GLsizei
_mesa_get_tex_max_num_levels(GLenum target, GLsizei width, GLsizei height,
GLsizei depth);