diff options
author | Keith Whitwell <[email protected]> | 2010-09-08 18:37:45 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-09-11 10:04:53 +0100 |
commit | bc759cd37e7d51977bcda46dde61d118e4c372e0 (patch) | |
tree | 427eba15200c420d59ecbc10cce26beb99dd8a85 /src/gallium/drivers/llvmpipe/lp_scene.h | |
parent | b7a54b3dc6879fbcd0a1226fa6891eddd14baa36 (diff) |
llvmpipe: add DEBUG_MEM option
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_scene.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h index 49c5d4d5770..eb433f22b41 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.h +++ b/src/gallium/drivers/llvmpipe/lp_scene.h @@ -38,6 +38,7 @@ #include "os/os_thread.h" #include "lp_tile_soa.h" #include "lp_rast.h" +#include "lp_debug.h" struct lp_scene_queue; @@ -205,6 +206,11 @@ lp_scene_alloc( struct lp_scene *scene, unsigned size) assert(size <= DATA_BLOCK_SIZE); assert(block != NULL); + if (LP_DEBUG & DEBUG_MEM) + debug_printf("alloc %d block %d/%d tot %d/%d\n", + size, block->used, DATA_BLOCK_SIZE, + scene->scene_size, LP_SCENE_MAX_SIZE); + if (block->used + size > DATA_BLOCK_SIZE) { block = lp_scene_new_data_block( scene ); if (!block) { @@ -232,6 +238,12 @@ lp_scene_alloc_aligned( struct lp_scene *scene, unsigned size, struct data_block *block = list->head; assert(block != NULL); + + if (LP_DEBUG & DEBUG_MEM) + debug_printf("alloc %d block %d/%d tot %d/%d\n", + size + alignment - 1, + block->used, DATA_BLOCK_SIZE, + scene->scene_size, LP_SCENE_MAX_SIZE); if (block->used + size + alignment - 1 > DATA_BLOCK_SIZE) { block = lp_scene_new_data_block( scene ); |