mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
clamp BiasMin, BiasMax to reasonable values
This commit is contained in:
parent
04800374ee
commit
f132413965
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue