diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-03-17 09:42:08 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-03-17 09:42:08 -0600 |
commit | a2ab6930df2c26e19a723b43a757718ecbc89bcd (patch) | |
tree | 62dbef539ea7e79a5f63a94e57723d5492b78d89 /src/mesa/state_tracker/st_gen_mipmap.c | |
parent | f3c490634ffb8cd2c5329ba1ebfe9c738c2b7441 (diff) |
gallium: in gen_mipmap, also set sampler lod_bias and do a flush() after rendering each level
Diffstat (limited to 'src/mesa/state_tracker/st_gen_mipmap.c')
-rw-r--r-- | src/mesa/state_tracker/st_gen_mipmap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index 9c4e1032ef..6ae235df6f 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -282,8 +282,13 @@ st_render_mipmap(struct st_context *st, /* * Setup sampler state + * Note: we should only have to set the min/max LOD clamps to ensure + * we grab texels from the right mipmap level. But some hardware + * has trouble with min clamping so we also setting the lod_bias to + * try to work around that. */ sampler.min_lod = sampler.max_lod = srcLevel; + sampler.lod_bias = srcLevel; sampler_cso = pipe->create_sampler_state(pipe, &sampler); pipe->bind_sampler_states(pipe, 1, &sampler_cso); @@ -298,6 +303,7 @@ st_render_mipmap(struct st_context *st, draw_quad(st->ctx); + pipe->flush(pipe, PIPE_FLUSH_WAIT); pipe->delete_sampler_state(pipe, sampler_cso); } |