struct nvfx_sampler_state *ps,
const struct pipe_sampler_state *cso)
{
- float limit;
-
if (cso->max_anisotropy >= 2)
{
if (cso->max_anisotropy >= 8)
ps->en |= NV30_3D_TEX_ENABLE_ANISO_2X;
}
- 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);
struct nvfx_sampler_state *ps,
const struct pipe_sampler_state *cso)
{
- float limit;
if (cso->max_anisotropy >= 2) {
/* no idea, binary driver sets it, works without it.. meh.. */
ps->wrap |= (1 << 5);
ps->en |= NV40_3D_TEX_ENABLE_ANISO_2X;
}
- 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 + (255.0 / 256.0)) * 256.0);