summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texgetimage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-11-18 17:39:00 -0700
committerBrian Paul <[email protected]>2011-11-19 07:28:07 -0700
commit2efa3d4f9fd1e1683c5366d402d8740ecfb688e5 (patch)
treebb164b00ada68c6af90f8f536c548670acb9a23b /src/mesa/main/texgetimage.c
parenta43908fe62c39b84f014ddf2bee15cd07a77fc0d (diff)
mesa: define, use _mesa_is_cube_face() in several places
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/texgetimage.c')
-rw-r--r--src/mesa/main/texgetimage.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 31d49f2d823..06506594d63 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -386,11 +386,10 @@ get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type,
* so we don't have to worry about those.
* XXX more format combinations could be supported here.
*/
- if ((target == GL_TEXTURE_1D ||
- target == GL_TEXTURE_2D ||
- target == GL_TEXTURE_RECTANGLE ||
- (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X &&
- target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) {
+ if (target == GL_TEXTURE_1D ||
+ target == GL_TEXTURE_2D ||
+ target == GL_TEXTURE_RECTANGLE ||
+ _mesa_is_cube_face(target)) {
if ((texImage->TexFormat == MESA_FORMAT_ARGB8888 ||
texImage->TexFormat == MESA_FORMAT_SARGB8) &&
format == GL_BGRA &&