Cycles: Add names to buffer allocations
This is to help debug and track memory usage for generic buffers. We have similar for textures already since those require a name, but for buffers the name is only for debugging proposes.
This commit is contained in:
@@ -106,11 +106,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void mem_alloc(device_memory& mem, MemoryType type)
|
||||
void mem_alloc(const char *name, device_memory& mem, MemoryType type)
|
||||
{
|
||||
foreach(SubDevice& sub, devices) {
|
||||
mem.device_pointer = 0;
|
||||
sub.device->mem_alloc(mem, type);
|
||||
sub.device->mem_alloc(name, mem, type);
|
||||
sub.ptr_map[unique_ptr] = mem.device_pointer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user