diff options
author | Brian Paul <[email protected]> | 2012-08-21 20:22:27 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-08-24 06:18:41 -0600 |
commit | 46751edca9a95baff81771aa69986fa6e2422ed6 (patch) | |
tree | c0022e06d939d20f8e2fd48eace419fbebcc9e9b /src/mesa/main/mipmap.c | |
parent | 8a935d71ff4ded6f3cdd8e06dcd1a5e3de3d3cc0 (diff) |
mesa: new _mesa_num_tex_faces() helper
Not a real big help now, but will be useful for the
GL_ARB_texture_cube_map_array extension in the future.
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r-- | src/mesa/main/mipmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 00d3e8f9ed6..15373ba69b0 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -33,6 +33,7 @@ #include "mipmap.h" #include "mtypes.h" #include "teximage.h" +#include "texobj.h" #include "texstore.h" #include "image.h" #include "macros.h" @@ -1817,7 +1818,7 @@ _mesa_prepare_mipmap_level(struct gl_context *ctx, GLsizei width, GLsizei height, GLsizei depth, GLsizei border, GLenum intFormat, gl_format format) { - const GLuint numFaces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1; + const GLuint numFaces = _mesa_num_tex_faces(texObj->Target); GLuint face; if (texObj->Immutable) { |