forked from bartvdbraak/blender
Cycles: Add some statistics logging
Covers number of entities in the scene (objects, meshes etc), also reports sizes of textures being allocated.
This commit is contained in:
parent
1e71270f77
commit
2f5dd83759
@ -38,6 +38,7 @@
|
||||
#include "util_debug.h"
|
||||
#include "util_foreach.h"
|
||||
#include "util_function.h"
|
||||
#include "util_logging.h"
|
||||
#include "util_opengl.h"
|
||||
#include "util_progress.h"
|
||||
#include "util_system.h"
|
||||
@ -115,6 +116,7 @@ public:
|
||||
|
||||
void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool /*periodic*/)
|
||||
{
|
||||
VLOG(1) << "Texture allocate: " << name << ", " << mem.memory_size() << " bytes.";
|
||||
kernel_tex_copy(&kernel_globals, name, mem.data_pointer, mem.data_width, mem.data_height, mem.data_depth, interpolation);
|
||||
mem.device_pointer = mem.data_pointer;
|
||||
mem.device_size = mem.memory_size();
|
||||
|
@ -419,6 +419,7 @@ public:
|
||||
void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool periodic)
|
||||
{
|
||||
/* todo: support 3D textures, only CPU for now */
|
||||
VLOG(1) << "Texture allocate: " << name << ", " << mem.memory_size() << " bytes.";
|
||||
|
||||
/* determine format */
|
||||
CUarray_format_enum format;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "util_foreach.h"
|
||||
#include "util_list.h"
|
||||
#include "util_logging.h"
|
||||
#include "util_map.h"
|
||||
#include "util_time.h"
|
||||
|
||||
@ -170,6 +171,8 @@ public:
|
||||
|
||||
void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool periodic)
|
||||
{
|
||||
VLOG(1) << "Texture allocate: " << name << ", " << mem.memory_size() << " bytes.";
|
||||
|
||||
foreach(SubDevice& sub, devices) {
|
||||
mem.device_pointer = 0;
|
||||
sub.device->tex_alloc(name, mem, interpolation, periodic);
|
||||
|
@ -164,6 +164,8 @@ public:
|
||||
|
||||
void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool periodic)
|
||||
{
|
||||
VLOG(1) << "Texture allocate: " << name << ", " << mem.memory_size() << " bytes.";
|
||||
|
||||
thread_scoped_lock lock(rpc_lock);
|
||||
|
||||
mem.device_pointer = ++mem_counter;
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "buffers.h"
|
||||
|
||||
#include "util_foreach.h"
|
||||
#include "util_logging.h"
|
||||
#include "util_map.h"
|
||||
#include "util_math.h"
|
||||
#include "util_md5.h"
|
||||
@ -859,6 +860,7 @@ public:
|
||||
InterpolationType /*interpolation*/,
|
||||
bool /*periodic*/)
|
||||
{
|
||||
VLOG(1) << "Texture allocate: " << name << ", " << mem.memory_size() << " bytes.";
|
||||
mem_alloc(mem, MEM_READ_ONLY);
|
||||
mem_copy_to(mem);
|
||||
assert(mem_map.find(name) == mem_map.end());
|
||||
|
@ -662,6 +662,8 @@ void LightManager::device_update_points(Device *device, DeviceScene *dscene, Sce
|
||||
|
||||
void LightManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
|
||||
{
|
||||
VLOG(1) << "Total " << scene->lights.size() << " lights.";
|
||||
|
||||
if(!need_update)
|
||||
return;
|
||||
|
||||
|
@ -1150,6 +1150,8 @@ void MeshManager::device_update_flags(Device * /*device*/,
|
||||
|
||||
void MeshManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
|
||||
{
|
||||
VLOG(1) << "Total " << scene->meshes.size() << " meshes.";
|
||||
|
||||
if(!need_update)
|
||||
return;
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "scene.h"
|
||||
|
||||
#include "util_foreach.h"
|
||||
#include "util_logging.h"
|
||||
#include "util_map.h"
|
||||
#include "util_progress.h"
|
||||
#include "util_vector.h"
|
||||
@ -377,6 +378,8 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene
|
||||
|
||||
void ObjectManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
|
||||
{
|
||||
VLOG(1) << "Total " << scene->objects.size() << " objects.";
|
||||
|
||||
if(!need_update)
|
||||
return;
|
||||
|
||||
|
@ -75,6 +75,8 @@ void OSLShaderManager::reset(Scene * /*scene*/)
|
||||
|
||||
void OSLShaderManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
|
||||
{
|
||||
VLOG(1) << "Total " << scene->shaders.size() << " shaders.";
|
||||
|
||||
if(!need_update)
|
||||
return;
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "scene.h"
|
||||
|
||||
#include "util_foreach.h"
|
||||
#include "util_logging.h"
|
||||
#include "util_map.h"
|
||||
#include "util_progress.h"
|
||||
#include "util_vector.h"
|
||||
@ -92,6 +93,9 @@ void ParticleSystemManager::device_update_particles(Device *device, DeviceScene
|
||||
|
||||
void ParticleSystemManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
|
||||
{
|
||||
VLOG(1) << "Total " << scene->particle_systems.size()
|
||||
<< " particle systems.";
|
||||
|
||||
if(!need_update)
|
||||
return;
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "svm.h"
|
||||
|
||||
#include "util_debug.h"
|
||||
#include "util_logging.h"
|
||||
#include "util_foreach.h"
|
||||
#include "util_progress.h"
|
||||
|
||||
@ -45,6 +46,8 @@ void SVMShaderManager::reset(Scene * /*scene*/)
|
||||
|
||||
void SVMShaderManager::device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress)
|
||||
{
|
||||
VLOG(1) << "Total " << scene->shaders.size() << " shaders.";
|
||||
|
||||
if(!need_update)
|
||||
return;
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "tables.h"
|
||||
|
||||
#include "util_debug.h"
|
||||
#include "util_logging.h"
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
@ -36,6 +37,8 @@ LookupTables::~LookupTables()
|
||||
|
||||
void LookupTables::device_update(Device *device, DeviceScene *dscene)
|
||||
{
|
||||
VLOG(1) << "Total " << lookup_tables.size() << " lookup tables.";
|
||||
|
||||
if(!need_update)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user