Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/util_profiling.cpp
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | foreach (ProfilingState *state, states) { | ||||
| /* The state reads/writes should be atomic, but just to be sure | /* The state reads/writes should be atomic, but just to be sure | ||||
| * check the values for validity anyways. */ | * check the values for validity anyways. */ | ||||
| if (cur_event < PROFILING_NUM_EVENTS) { | if (cur_event < PROFILING_NUM_EVENTS) { | ||||
| event_samples[cur_event]++; | event_samples[cur_event]++; | ||||
| } | } | ||||
| if (cur_shader >= 0 && cur_shader < shader_samples.size()) { | if (cur_shader >= 0 && cur_shader < shader_samples.size()) { | ||||
| /* Only consider the active shader during events whose runtime significantly depends on it. | |||||
| */ | |||||
| if (((cur_event >= PROFILING_SHADER_EVAL) && (cur_event <= PROFILING_SUBSURFACE)) || | |||||
| ((cur_event >= PROFILING_CLOSURE_EVAL) && | |||||
| (cur_event <= PROFILING_CLOSURE_VOLUME_SAMPLE))) { | |||||
| shader_samples[cur_shader]++; | shader_samples[cur_shader]++; | ||||
| } | } | ||||
| } | |||||
| if (cur_object >= 0 && cur_object < object_samples.size()) { | if (cur_object >= 0 && cur_object < object_samples.size()) { | ||||
| object_samples[cur_object]++; | object_samples[cur_object]++; | ||||
| } | } | ||||
| } | } | ||||
| lock.unlock(); | lock.unlock(); | ||||
| /* Relative waits always overshoot a bit, so just waiting 1ms every | /* Relative waits always overshoot a bit, so just waiting 1ms every | ||||
| ▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines | |||||