summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_tile_cache.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-20 15:18:02 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-20 15:18:02 -0600
commit7e8396399824108d62dc3e02b2af0422e98aab8e (patch)
tree89f1ca9279bdc87e2f1b9125322331898a020466 /src/mesa/pipe/softpipe/sp_tile_cache.h
parent832e73bc098fa8fd680d70cb495f495b33769630 (diff)
Convert Z/stencil ops to use cached tiles like colors.
Also, quite a bit of re-org of the tile caches and surface mapping/unmapping. Leave surfaces mapped between primitives now.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_tile_cache.h')
-rw-r--r--src/mesa/pipe/softpipe/sp_tile_cache.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mesa/pipe/softpipe/sp_tile_cache.h b/src/mesa/pipe/softpipe/sp_tile_cache.h
index 4248361f99..80bcac6904 100644
--- a/src/mesa/pipe/softpipe/sp_tile_cache.h
+++ b/src/mesa/pipe/softpipe/sp_tile_cache.h
@@ -36,6 +36,9 @@ struct softpipe_context;
struct softpipe_tile_cache;
+/**
+ * Cache tile size (width and height). This needs to be a power of two.
+ */
#define TILE_SIZE 64
@@ -45,7 +48,9 @@ struct softpipe_cached_tile
int x, y; /** pos of tile in window coords */
union {
float color[TILE_SIZE][TILE_SIZE][4];
- uint depth[TILE_SIZE][TILE_SIZE];
+ uint depth32[TILE_SIZE][TILE_SIZE];
+ ushort depth16[TILE_SIZE][TILE_SIZE];
+ ubyte stencil8[TILE_SIZE][TILE_SIZE];
} data;
};
@@ -57,13 +62,17 @@ extern void
sp_destroy_tile_cache(struct softpipe_tile_cache *tc);
extern void
-sp_flush_tile_cache(struct softpipe_surface *sps);
+sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
+ struct softpipe_surface *sps);
extern void
-sp_clear_tile_cache(struct softpipe_surface *sps, unsigned clearval);
+sp_flush_tile_cache(struct softpipe_tile_cache *tc);
+
+extern void
+sp_clear_tile_cache(struct softpipe_tile_cache *tc, unsigned clearval);
extern struct softpipe_cached_tile *
-sp_get_cached_tile(struct softpipe_surface *sps, int x, int y);
+sp_get_cached_tile(struct softpipe_tile_cache *tc, int x, int y);
#endif /* SP_TILE_CACHE_H */