#include "os/os_thread.h"
#include "lp_tile_soa.h"
#include "lp_rast.h"
+#include "lp_debug.h"
struct lp_scene_queue;
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) {
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 );
{ "counters", DEBUG_COUNTERS, NULL },
{ "scene", DEBUG_SCENE, NULL },
{ "fence", DEBUG_FENCE, NULL },
+ { "mem", DEBUG_MEM, NULL },
DEBUG_NAMED_VALUE_END
};
#endif