radv: Refactor radv_tex_aniso_filter

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15860>
This commit is contained in:
Konstantin Seurer 2022-04-11 17:53:57 +02:00 committed by Marge Bot
parent 6b65d4234c
commit a9fce44dd6

View file

@ -6106,15 +6106,7 @@ radv_tex_bordercolor(VkBorderColor bcolor)
static unsigned
radv_tex_aniso_filter(unsigned filter)
{
if (filter < 2)
return 0;
if (filter < 4)
return 1;
if (filter < 8)
return 2;
if (filter < 16)
return 3;
return 4;
return MIN2(util_logbase2(filter), 4);
}
static unsigned