diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2009-01-13 10:58:17 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2009-01-13 13:57:22 +1000 |
commit | 68bb26b62d87ae6737ba51a4bffda49eeb7647cb (patch) | |
tree | c0bf6a792666fa04e1a801a80db6da7be02fe3eb /src/gallium/drivers/nv50 | |
parent | f7c2010525a3fb37079c2cff51d4c593ef8e807b (diff) | |
download | external_mesa3d-68bb26b62d87ae6737ba51a4bffda49eeb7647cb.zip external_mesa3d-68bb26b62d87ae6737ba51a4bffda49eeb7647cb.tar.gz external_mesa3d-68bb26b62d87ae6737ba51a4bffda49eeb7647cb.tar.bz2 |
nv50: shadow mapping
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nv50/nv50_state.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index 381b3e2..8e084e6 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -106,7 +106,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, int param) case PIPE_CAP_OCCLUSION_QUERY: return 1; case PIPE_CAP_TEXTURE_SHADOW_MAP: - return 0; + return 1; case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: return 13; case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c index cabe54b..38c1d93 100644 --- a/src/gallium/drivers/nv50/nv50_state.c +++ b/src/gallium/drivers/nv50/nv50_state.c @@ -196,6 +196,11 @@ nv50_sampler_state_create(struct pipe_context *pipe, if (cso->max_anisotropy >= 2.0) tsc[0] |= (1 << 20); + if (cso->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) { + tsc[0] |= (1 << 8); + tsc[0] |= (nvgl_comparison_op(cso->compare_func) & 0x7); + } + return (void *)tsc; } |