aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texstorage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-27 08:17:50 +0200
committermarha <marha@users.sourceforge.net>2012-09-04 14:23:00 +0200
commit02b914d3b9b658a16e17cf2d95deede75dbbacc9 (patch)
tree3757711ab3e1db8e1b59877354096503d9635112 /mesalib/src/mesa/main/texstorage.c
parentf479a5fc7f844d96b169c399cb1e8ac085de6c2b (diff)
downloadvcxsrv-02b914d3b9b658a16e17cf2d95deede75dbbacc9.tar.gz
vcxsrv-02b914d3b9b658a16e17cf2d95deede75dbbacc9.tar.bz2
vcxsrv-02b914d3b9b658a16e17cf2d95deede75dbbacc9.zip
xwininfo fontconfig libX11 libXau libXext libxcb mesa pixman
xkeyboard-config git update 27 Aug 2012
Diffstat (limited to 'mesalib/src/mesa/main/texstorage.c')
-rw-r--r--mesalib/src/mesa/main/texstorage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/texstorage.c b/mesalib/src/mesa/main/texstorage.c
index 5e1f31a93..f8af8bf01 100644
--- a/mesalib/src/mesa/main/texstorage.c
+++ b/mesalib/src/mesa/main/texstorage.c
@@ -36,6 +36,7 @@
#include "macros.h"
#include "mfeatures.h"
#include "teximage.h"
+#include "texobj.h"
#include "texstorage.h"
#include "mtypes.h"
@@ -128,7 +129,7 @@ setup_texstorage(struct gl_context *ctx,
GLsizei width, GLsizei height, GLsizei depth)
{
const GLenum target = texObj->Target;
- const GLuint numFaces = (target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
+ const GLuint numFaces = _mesa_num_tex_faces(target);
gl_format texFormat;
GLint level, levelWidth = width, levelHeight = height, levelDepth = depth;
GLuint face;
@@ -206,7 +207,7 @@ clear_image_fields(struct gl_context *ctx,
struct gl_texture_object *texObj)
{
const GLenum target = texObj->Target;
- const GLuint numFaces = (target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
+ const GLuint numFaces = _mesa_num_tex_faces(target);
GLint level;
GLuint face;