mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 22:40:24 +01:00
nv50: aniso
This commit is contained in:
parent
918fc55e5f
commit
f7c2010525
2 changed files with 22 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, int param)
|
|||
case PIPE_CAP_S3TC:
|
||||
return 0;
|
||||
case PIPE_CAP_ANISOTROPIC_FILTER:
|
||||
return 0;
|
||||
return 1;
|
||||
case PIPE_CAP_POINT_SPRITE:
|
||||
return 0;
|
||||
case PIPE_CAP_MAX_RENDER_TARGETS:
|
||||
|
|
|
|||
|
|
@ -175,6 +175,27 @@ nv50_sampler_state_create(struct pipe_context *pipe,
|
|||
break;
|
||||
}
|
||||
|
||||
if (cso->max_anisotropy >= 16.0)
|
||||
tsc[0] |= (7 << 20);
|
||||
else
|
||||
if (cso->max_anisotropy >= 12.0)
|
||||
tsc[0] |= (6 << 20);
|
||||
else
|
||||
if (cso->max_anisotropy >= 10.0)
|
||||
tsc[0] |= (5 << 20);
|
||||
else
|
||||
if (cso->max_anisotropy >= 8.0)
|
||||
tsc[0] |= (4 << 20);
|
||||
else
|
||||
if (cso->max_anisotropy >= 6.0)
|
||||
tsc[0] |= (3 << 20);
|
||||
else
|
||||
if (cso->max_anisotropy >= 4.0)
|
||||
tsc[0] |= (2 << 20);
|
||||
else
|
||||
if (cso->max_anisotropy >= 2.0)
|
||||
tsc[0] |= (1 << 20);
|
||||
|
||||
return (void *)tsc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue