From: Kenneth Graunke Date: Thu, 6 Mar 2014 03:06:51 +0000 (-0800) Subject: meta: Use minify() in GenerateMipmaps code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45ee1b30d76cae79b5040bda72ecd87d7d39f1e3;p=mesa.git meta: Use minify() in GenerateMipmaps code. This is what the macro is for. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner Reviewed-by: Anuj Phogat Reviewed-by: Ian Romanick --- diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c index 6a0ccbdb7dd..9bce97d6561 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 &&