summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_clear.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-19 10:10:08 -0600
committerBrian <[email protected]>2007-10-19 10:10:08 -0600
commit2b2f761e2b0dc160793be2f48e811d2d455e1e22 (patch)
tree390bd4395ff8f92a84c586142e3703bf32fad006 /src/mesa/pipe/softpipe/sp_clear.c
parent46c3cf18315345effd15a69987294c1195843e2a (diff)
Initial implementation of surface tile caching.
Instead of using read/write_quad() functions, do framebuffer accesses via get/put_tile(). A cache of tiles is used to avoid frequent get/put() calls. Only implemented for color buffers right now.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_clear.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_clear.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_clear.c b/src/mesa/pipe/softpipe/sp_clear.c
index 539da1d58b3..46370b4ed9a 100644
--- a/src/mesa/pipe/softpipe/sp_clear.c
+++ b/src/mesa/pipe/softpipe/sp_clear.c
@@ -35,6 +35,7 @@
#include "sp_context.h"
#include "sp_surface.h"
#include "sp_state.h"
+#include "sp_tile_cache.h"
/**
@@ -46,6 +47,7 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
+ struct softpipe_surface *sps = softpipe_surface(ps);
unsigned x, y, w, h;
softpipe_update_derived(softpipe); /* not needed?? */
@@ -64,5 +66,8 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
assert(w <= ps->region->pitch);
assert(h <= ps->region->height);
+ /* XXX skip this fill if we're using tile cache */
pipe->region_fill(pipe, ps->region, 0, x, y, w, h, clearValue);
+
+ sp_clear_tile_cache(sps, clearValue);
}