summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta_generate_mipmap.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-03-05 19:06:51 -0800
committerKenneth Graunke <kenneth@whitecape.org>2014-03-07 22:45:13 -0800
commit45ee1b30d76cae79b5040bda72ecd87d7d39f1e3 (patch)
treed2e034c83c6c5c0ed17ed8ec02167c9a03f6a081 /src/mesa/drivers/common/meta_generate_mipmap.c
parent9afca9198471e77a65f3ab70f2a9b4a67396b1a0 (diff)
downloadexternal_mesa3d-45ee1b30d76cae79b5040bda72ecd87d7d39f1e3.zip
external_mesa3d-45ee1b30d76cae79b5040bda72ecd87d7d39f1e3.tar.gz
external_mesa3d-45ee1b30d76cae79b5040bda72ecd87d7d39f1e3.tar.bz2
meta: Use minify() in GenerateMipmaps code.
This is what the macro is for. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers/common/meta_generate_mipmap.c')
-rw-r--r--src/mesa/drivers/common/meta_generate_mipmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c
index 6a0ccbd..9bce97d 100644
--- a/src/mesa/drivers/common/meta_generate_mipmap.c
+++ b/src/mesa/drivers/common/meta_generate_mipmap.c
@@ -282,9 +282,9 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
srcDepth = srcImage->Depth;
/* new dst size */
- dstWidth = MAX2(1, srcWidth / 2);
- dstHeight = MAX2(1, srcHeight / 2);
- dstDepth = MAX2(1, srcDepth / 2);
+ dstWidth = minify(srcWidth, 1);
+ dstHeight = minify(srcHeight, 1);
+ dstDepth = minify(srcDepth, 1);
if (dstWidth == srcImage->Width &&
dstHeight == srcImage->Height &&