From: Brian Paul Date: Sat, 24 Oct 2009 00:15:55 +0000 (-0600) Subject: mesa: simplify att->CubeMapFace assignment X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26f1ad65b988fe55ae12a99994e4c63aaab899a0;p=mesa.git mesa: simplify att->CubeMapFace assignment --- diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 18f6cec91e5..85d3d3db997 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -240,12 +240,7 @@ _mesa_set_texture_attachment(GLcontext *ctx, /* always update these fields */ att->TextureLevel = level; - if (IS_CUBE_FACE(texTarget)) { - att->CubeMapFace = texTarget - GL_TEXTURE_CUBE_MAP_POSITIVE_X; - } - else { - att->CubeMapFace = 0; - } + att->CubeMapFace = _mesa_tex_target_to_face(texTarget); att->Zoffset = zoffset; att->Complete = GL_FALSE;