etnaviv: tex_state: fix miplevel selection
authorLucas Stach <l.stach@pengutronix.de>
Fri, 14 Aug 2020 21:55:20 +0000 (23:55 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Tue, 15 Dec 2020 14:43:23 +0000 (15:43 +0100)
commit0ba788d73b47aa9c40c692c95e756a39c151bf7d
tree0c8447e573505f49ffca0d2fad35987d7bb98a90
parentd21cc94201ab1e6cb54ff33a7a835248fe336777
etnaviv: tex_state: fix miplevel selection

Fixes the piglit tex-miplevel-selection test by:
1. properly taking texture baselevel and maxlevel into account
2. only enable lodbias when mipmapping is enabled

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7634>
src/gallium/drivers/etnaviv/etnaviv_texture_state.c