diff options
Diffstat (limited to 'video.cpp')
-rw-r--r-- | video.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -3838,6 +3838,10 @@ void Vram_Allocator::Page::init( chunk->next = 0; chunk->free = true; chunks = chunk; +#ifdef DEBUG + if (dev->hooks) + dev->hooks->on_page_alloc(s); +#endif } Vram_Allocator::Allocation Vram_Allocator::Page::imp_alloc( @@ -3905,6 +3909,10 @@ Vram_Allocator::Allocation Vram_Allocator::Page::alloc( if (!a.chunk) return a; al = align_address((uintptr_t)a.chunk->offset, (size_t)align); a.chunk->pad = al - a.chunk->offset; +#if DEBUG + if (dev->hooks) + dev->hooks->on_vram_alloc(as, align); +#endif return a; } @@ -4043,3 +4051,12 @@ void Device_Debug_Hooks::on_submit(Context& ctx) { void Device_Debug_Hooks::on_present(Context& ctx) { (void)ctx; } + +void Device_Debug_Hooks::on_page_alloc(size_t size) { + (void)size; +} + +void Device_Debug_Hooks::on_vram_alloc(size_t size, size_t align) { + (void)size; + (void)align; +}
\ No newline at end of file |