From: Brian Paul Date: Fri, 26 Mar 2004 18:05:36 +0000 (+0000) Subject: clamp BiasMin, BiasMax to reasonable values X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f132413965a49c0554988a88edb8b101de657493;p=mesa.git clamp BiasMin, BiasMax to reasonable values --- diff --git a/progs/demos/lodbias.c b/progs/demos/lodbias.c index bee06da80b0..a9b5312fd75 100644 --- a/progs/demos/lodbias.c +++ b/progs/demos/lodbias.c @@ -252,6 +252,14 @@ static void Init( void ) printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias); BiasMin = -100 * maxBias; BiasMax = 100 * maxBias; + + /* Since we have (about) 8 mipmap levels, no need to bias beyond + * the range [-1, +8]. + */ + if (BiasMin < -100) + BiasMin = -100; + if (BiasMax > 800) + BiasMax = 800; }