This makes lod clamping more consistent with other drivers.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
* - min/max LOD clamping
*/
cso->min_lod = 0;
- cso->view_min_lod = MAX2(sampler->min_lod, 0);
- cso->view_max_lod = MAX2(sampler->max_lod, 0);
+ cso->view_min_lod = MAX2((int) (sampler->min_lod + 0.5), 0);
+ cso->view_max_lod = MAX2((int) (sampler->max_lod + 0.5), 0);
/* Use min_mipmap */
if (svga->debug.use_min_mipmap) {