mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 16:00:24 +01:00
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>
(cherry picked from commit 5abcd198b8)
This commit is contained in:
parent
ed8fcc0c82
commit
fc7d43ee9a
1 changed files with 2 additions and 2 deletions
|
|
@ -125,8 +125,8 @@ svga_create_sampler_state(struct pipe_context *pipe,
|
|||
* - 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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue