Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-23 19:00:18 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-23 19:14:35 +0300
commit6be95f87787de68fb55b86968ddeb7c2507bf4f9 (patch)
tree62533a7a3f8f10bad913203cefdc3e52c1743ec2
parentdd04f54e845e976e525e17a4bfa91714a2bca341 (diff)
Fix T53357: harmless assert after recent addition of render time pass.
-rw-r--r--intern/cycles/render/buffers.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index 2fa297371f4..5c7729ec89f 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -236,10 +236,17 @@ bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int
int size = params.width*params.height;
- if(components == 1) {
+ if(components == 1 && type == PASS_RENDER_TIME) {
+ /* Render time is not stored by kernel, but measured per tile. */
+ float val = (float) (1000.0 * render_time/(params.width * params.height * sample));
+ for(int i = 0; i < size; i++, pixels++) {
+ pixels[0] = val;
+ }
+ }
+ else if(components == 1) {
assert(pass.components == components);
- /* scalar */
+ /* Scalar */
if(type == PASS_DEPTH) {
for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
float f = *in;
@@ -264,12 +271,6 @@ bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int
}
}
#endif
- else if(type == PASS_RENDER_TIME) {
- float val = (float) (1000.0 * render_time/(params.width * params.height * sample));
- for(int i = 0; i < size; i++, pixels++) {
- pixels[0] = val;
- }
- }
else {
for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
float f = *in;