svga: add 0.5 in float->int conversion of sample min/max lod
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>
This commit is contained in:
@@ -125,8 +125,8 @@ svga_create_sampler_state(struct pipe_context *pipe,
|
|||||||
* - min/max LOD clamping
|
* - min/max LOD clamping
|
||||||
*/
|
*/
|
||||||
cso->min_lod = 0;
|
cso->min_lod = 0;
|
||||||
cso->view_min_lod = MAX2(sampler->min_lod, 0);
|
cso->view_min_lod = MAX2((int) (sampler->min_lod + 0.5), 0);
|
||||||
cso->view_max_lod = MAX2(sampler->max_lod, 0);
|
cso->view_max_lod = MAX2((int) (sampler->max_lod + 0.5), 0);
|
||||||
|
|
||||||
/* Use min_mipmap */
|
/* Use min_mipmap */
|
||||||
if (svga->debug.use_min_mipmap) {
|
if (svga->debug.use_min_mipmap) {
|
||||||
|
Reference in New Issue
Block a user