summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_texture.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-05-11 11:50:43 -0600
committerBrian Paul <[email protected]>2010-05-11 11:52:06 -0600
commitfea189d6e4f0c09eb0d005c5fa06db43b56e2e37 (patch)
tree2e8aaf3b477515edac3d5e24e32cfd74275e5b66 /src/gallium/drivers/llvmpipe/lp_texture.h
parentf70d900b805b90f6f53da9698cf8025f88b7e1e0 (diff)
llvmpipe: add a simple resource tracking/debug feature
If debug build, keep a linked list of all allocated resources (textures). The llvmipe_print_resources() function can be called from a debugger to print a list of all resources, their sizes, total size, etc.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index a8d08d6247f..503b6a19a8d 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -119,6 +119,11 @@ struct llvmpipe_resource
unsigned timestamp;
unsigned id; /**< temporary, for debugging */
+
+#ifdef DEBUG
+ /** for linked list */
+ struct llvmpipe_resource *prev, *next;
+#endif
};
@@ -220,6 +225,10 @@ llvmpipe_get_texture_tile(struct llvmpipe_resource *lpr,
extern void
+llvmpipe_print_resources(void);
+
+
+extern void
llvmpipe_init_screen_texture_funcs(struct pipe_screen *screen);
extern void