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:
2016-12-13 20:45:09 -05:00
parent 817873cc83
commit b78e543af9
14 changed files with 53 additions and 29 deletions

View File

@@ -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;
}