diff options
author | Brian Paul <[email protected]> | 2016-02-11 08:14:27 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-02-12 15:11:38 -0700 |
commit | 6e09df24b5cd7da0f49622db15ca70f5b2a3594b (patch) | |
tree | 0b1cb48ccf77d1aa2cbf36cfc0d3b16e5a5f96eb /src/mesa/main/mipmap.c | |
parent | 82db969ac014531dcaba4e4637d6c691f5825e4b (diff) |
mesa: simplify some code with new _mesa_cube_face_target() function
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r-- | src/mesa/main/mipmap.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 7fd6fbf5360..5a02780b960 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1838,12 +1838,7 @@ _mesa_prepare_mipmap_level(struct gl_context *ctx, for (face = 0; face < numFaces; face++) { struct gl_texture_image *dstImage; - GLenum target; - - if (numFaces == 1) - target = texObj->Target; - else - target = GL_TEXTURE_CUBE_MAP_POSITIVE_X + face; + const GLenum target = _mesa_cube_face_target(texObj->Target, face); dstImage = _mesa_get_tex_image(ctx, texObj, target, level); if (!dstImage) { |