mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 17:50:12 +01:00
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>
This commit is contained in:
parent
9afca91984
commit
45ee1b30d7
1 changed files with 3 additions and 3 deletions
|
|
@ -282,9 +282,9 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
|
||||||
srcDepth = srcImage->Depth;
|
srcDepth = srcImage->Depth;
|
||||||
|
|
||||||
/* new dst size */
|
/* new dst size */
|
||||||
dstWidth = MAX2(1, srcWidth / 2);
|
dstWidth = minify(srcWidth, 1);
|
||||||
dstHeight = MAX2(1, srcHeight / 2);
|
dstHeight = minify(srcHeight, 1);
|
||||||
dstDepth = MAX2(1, srcDepth / 2);
|
dstDepth = minify(srcDepth, 1);
|
||||||
|
|
||||||
if (dstWidth == srcImage->Width &&
|
if (dstWidth == srcImage->Width &&
|
||||||
dstHeight == srcImage->Height &&
|
dstHeight == srcImage->Height &&
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue