From d9b0b4e960b07140e5ece4b4ff6a142277408bfb Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Sat, 7 Dec 2013 23:35:04 +0100 Subject: 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 Reviewed-by: Brian Paul --- src/mesa/main/teximage.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa/main/teximage.h') 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); -- cgit v1.2.3