summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_surface.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-19 10:10:08 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-19 10:10:08 -0600
commit2b2f761e2b0dc160793be2f48e811d2d455e1e22 (patch)
tree390bd4395ff8f92a84c586142e3703bf32fad006 /src/mesa/pipe/softpipe/sp_surface.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_surface.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_surface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c
index 292676a302..e5b4f249fa 100644
--- a/src/mesa/pipe/softpipe/sp_surface.c
+++ b/src/mesa/pipe/softpipe/sp_surface.c
@@ -25,12 +25,12 @@
*
**************************************************************************/
+#include "pipe/p_defines.h"
+#include "pipe/p_util.h"
#include "sp_context.h"
#include "sp_state.h"
#include "sp_surface.h"
-#include "pipe/p_defines.h"
-#include "pipe/p_util.h"
-
+#include "sp_tile_cache.h"
/**
* Softpipe surface functions.
@@ -871,6 +871,8 @@ s8_write_quad_stencil(struct softpipe_surface *sps,
void
softpipe_init_surface_funcs(struct softpipe_surface *sps)
{
+ sps->tc = sp_create_tile_cache();
+
assert(sps->surface.format);
switch (sps->surface.format) {