mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
shorten loops over color bufs
This commit is contained in:
parent
5d4b53b3af
commit
a110789f3e
3 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue