From: Brian Paul Date: Sat, 17 Mar 2012 22:30:02 +0000 (-0600) Subject: mesa: use MAX3() macro for 3D texture in _mesa_test_texobj_completeness() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cfd5b14dac6a197be3fa85b5448b45802951aa3d;p=mesa.git mesa: use MAX3() macro for 3D texture in _mesa_test_texobj_completeness() Reviewed-by: Kenneth Graunke Reviewed-by: José Fonseca Reviewed-by: Eric Anholt --- diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 59059482626..def09e2d7fa 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -465,9 +465,9 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, maxLevels = ctx->Const.MaxTextureLevels; } else if (t->Target == GL_TEXTURE_3D) { - GLint max = MAX2(t->Image[0][baseLevel]->WidthLog2, - t->Image[0][baseLevel]->HeightLog2); - maxLog2 = MAX2(max, (GLint)(t->Image[0][baseLevel]->DepthLog2)); + maxLog2 = MAX3(t->Image[0][baseLevel]->WidthLog2, + t->Image[0][baseLevel]->HeightLog2, + t->Image[0][baseLevel]->DepthLog2); maxLevels = ctx->Const.Max3DTextureLevels; } else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {