From 46751edca9a95baff81771aa69986fa6e2422ed6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 21 Aug 2012 20:22:27 -0600 Subject: 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. --- src/mesa/state_tracker/st_cb_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index a7c732bd72f..3de96adf3ed 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1299,7 +1299,7 @@ st_AllocTextureStorage(struct gl_context *ctx, GLsizei levels, GLsizei width, GLsizei height, GLsizei depth) { - const GLuint numFaces = (texObj->Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1; + const GLuint numFaces = _mesa_num_tex_faces(texObj->Target); struct st_context *st = st_context(ctx); struct st_texture_object *stObj = st_texture_object(texObj); GLuint ptWidth, ptHeight, ptDepth, ptLayers, bindings; -- cgit v1.2.3