[Mesa-dev] [PATCH 3/4] st/mesa: Clamp min_lod and max_lod to BaseLevel and MaxLevel
der.fabe at gmx.net
Wed Mar 30 08:41:46 PDT 2011
The problem ist that if BaseLevel + MinLod is bigger than MaxLevel, min_lod
becomes bigger than max_lod, so the code below swaps min_lod and max_lod and
we send a max_lod to the driver that is bigger than MaxLevel.
This could also be fixed by adding a condition like
if (sampler->min_lod > texobj->MaxLevel)
sampler->min_lod = texobj->MaxLevel;
But clamping is a little bit cleaner imho.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1580 bytes
Desc: not available
More information about the mesa-dev