summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-02-16 10:22:32 -0700
committerBrian Paul <brianp@vmware.com>2016-02-16 10:22:32 -0700
commit4277618235b229f46cf5570908d10ed810198d76 (patch)
treeae58e9026c4b3c221f18a447b20850dd282ad4c7 /src
parentffa1a1dd21a18534a044aa7e26f297c9f372ea4f (diff)
st/mesa: used _mesa_num_tex_faces() in st_finalize_texture()
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index a4c4648c484..09ff4c12f2a 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -2739,7 +2739,7 @@ st_finalize_texture(struct gl_context *ctx,
{
struct st_context *st = st_context(ctx);
struct st_texture_object *stObj = st_texture_object(tObj);
- const GLuint nr_faces = (stObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
+ const GLuint nr_faces = _mesa_num_tex_faces(stObj->base.Target);
GLuint face;
const struct st_texture_image *firstImage;
enum pipe_format firstImageFormat;