shorten loops over color bufs

This commit is contained in:
Brian 2007-12-07 20:58:01 -07:00
parent 5d4b53b3af
commit a110789f3e
3 changed files with 3 additions and 3 deletions

View file

@ -59,7 +59,7 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
return;
}
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
for (i = 0; i < softpipe->framebuffer.num_cbufs; i++) {
if (ps == sp_tile_cache_get_surface(softpipe->cbuf_cache[i])) {
sp_tile_cache_clear(softpipe->cbuf_cache[i], clearValue);
return;

View file

@ -94,7 +94,7 @@ softpipe_unmap_surfaces(struct softpipe_context *sp)
struct pipe_surface *ps;
uint i;
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
for (i = 0; i < sp->framebuffer.num_cbufs; i++)
sp_flush_tile_cache(sp, sp->cbuf_cache[i]);
sp_flush_tile_cache(sp, sp->zbuf_cache);
sp_flush_tile_cache(sp, sp->sbuf_cache);

View file

@ -55,7 +55,7 @@ softpipe_flush( struct pipe_context *pipe,
* - flush the render cache
*/
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
for (i = 0; i < softpipe->framebuffer.num_cbufs; i++)
if (softpipe->cbuf_cache[i])
sp_flush_tile_cache(softpipe, softpipe->cbuf_cache[i]);