Cycles: Initial implementation of detailed statistics
Gathers information about object geometry and textures. Very basic at this moment, but need to start somewhere. Things which needs to be included still: - "Runtime" information, like BVH. While it is not directly controllable by artists, it's still important to know. - Device array sizes. Again, not under artists control, but is added to the overall size. - Memory peak at different synchronization stages. At this point it simply prints info to the stdout after F12 is done, need better control over that too. Reviewers: brecht Differential Revision: https://developer.blender.org/D3566
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "device/device.h"
|
||||
#include "render/image.h"
|
||||
#include "render/scene.h"
|
||||
#include "render/stats.h"
|
||||
|
||||
#include "util/util_foreach.h"
|
||||
#include "util/util_logging.h"
|
||||
@@ -1042,4 +1043,15 @@ void ImageManager::device_free(Device *device)
|
||||
}
|
||||
}
|
||||
|
||||
void ImageManager::collect_statistics(RenderStats *stats)
|
||||
{
|
||||
for(int type = 0; type < IMAGE_DATA_NUM_TYPES; type++) {
|
||||
foreach(const Image *image, images[type]) {
|
||||
stats->image.textures.add_entry(
|
||||
NamedSizeEntry(path_filename(image->filename),
|
||||
image->mem->memory_size()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user