[Mesa-dev] [PATCH 1/4] st/mesa: used _mesa_num_tex_faces() in st_finalize_texture()

Brian Paul brianp at vmware.com
Fri Feb 12 15:44:58 UTC 2016


---
 src/mesa/state_tracker/st_cb_texture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index a4c4648..09ff4c1 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;
-- 
1.9.1



More information about the mesa-dev mailing list