diff options
Diffstat (limited to 'src/gallium/drivers/nvfx/nv40_fragtex.c')
-rw-r--r-- | src/gallium/drivers/nvfx/nv40_fragtex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/nvfx/nv40_fragtex.c b/src/gallium/drivers/nvfx/nv40_fragtex.c index 5fe742f260c..106ce71a079 100644 --- a/src/gallium/drivers/nvfx/nv40_fragtex.c +++ b/src/gallium/drivers/nvfx/nv40_fragtex.c @@ -29,11 +29,11 @@ nv40_sampler_state_init(struct pipe_context *pipe, ps->en |= NV40TCL_TEX_ENABLE_ANISO_2X; } - limit = CLAMP(cso->lod_bias, -16.0, 15.0); + limit = CLAMP(cso->lod_bias, -16.0, 15.0 + (255.0 / 256.0)); ps->filt |= (int)(cso->lod_bias * 256.0) & 0x1fff; - ps->max_lod = (int)(CLAMP(cso->max_lod, 0.0, 15.0) * 256.0); - ps->min_lod = (int)(CLAMP(cso->min_lod, 0.0, 15.0) * 256.0); + ps->max_lod = (int)(CLAMP(cso->max_lod, 0.0, 15.0 + (255.0 / 256.0)) * 256.0); + ps->min_lod = (int)(CLAMP(cso->min_lod, 0.0, 15.0 + (255.0 / 256.0)) * 256.0); ps->en |= NV40TCL_TEX_ENABLE_ENABLE; } |