diff options
| author | Brian <brian.paul@tungstengraphics.com> | 2007-12-07 20:31:26 -0700 | 
|---|---|---|
| committer | Ben Skeggs <skeggsb@gmail.com> | 2007-12-09 12:05:28 +1100 | 
| commit | 0ee512aaf03a2091f0cc5eee26712fe1f0992159 (patch) | |
| tree | 1132eb343ee224b67b4b7b7a85ee6a5d8c33640c /src | |
| parent | 92e7a02e5ac8f8589033954c7df188fdc4c330cb (diff) | |
code re-org in softpipe_clear()
Diffstat (limited to 'src')
| -rw-r--r-- | src/mesa/pipe/softpipe/sp_clear.c | 17 | 
1 files changed, 13 insertions, 4 deletions
| diff --git a/src/mesa/pipe/softpipe/sp_clear.c b/src/mesa/pipe/softpipe/sp_clear.c index bfe4a29144..f32e834ac0 100644 --- a/src/mesa/pipe/softpipe/sp_clear.c +++ b/src/mesa/pipe/softpipe/sp_clear.c @@ -47,19 +47,28 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,                 unsigned clearValue)  {     struct softpipe_context *softpipe = softpipe_context(pipe); +   uint i; +#if 0     softpipe_update_derived(softpipe); /* not needed?? */ +#endif +#if TILE_CLEAR_OPTIMIZATION     if (ps == sp_tile_cache_get_surface(softpipe->zbuf_cache)) {        sp_tile_cache_clear(softpipe->zbuf_cache, clearValue); +      return;     } -   else if (ps == sp_tile_cache_get_surface(softpipe->cbuf_cache[0])) { -      sp_tile_cache_clear(softpipe->cbuf_cache[0], clearValue); + +   for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { +      if (ps == sp_tile_cache_get_surface(softpipe->cbuf_cache[i])) { +         sp_tile_cache_clear(softpipe->cbuf_cache[i], clearValue); +         return; +      }     } +#endif -#if !TILE_CLEAR_OPTIMIZATION +   /* non-cached surface */     pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue); -#endif  #if 0     sp_clear_tile_cache(ps, clearValue); | 
