diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-02 19:46:57 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-02 19:47:27 +0300 |
commit | f694d3792941ce24092865cffb038aa0e5cc08f2 (patch) | |
tree | 13f0a119815366bd982202b696eea1e95891daa8 /intern | |
parent | 0ee97bd5c42bf64021819c8571f4e9346abb23b9 (diff) |
Fix T59792: Cycles crash rendering motion pass with motion blur enabled.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/film.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index d0f15496e50..355294e23b5 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -328,8 +328,17 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene) for(size_t i = 0; i < passes.size(); i++) { Pass& pass = passes[i]; - if(pass.type == PASS_NONE) + if(pass.type == PASS_NONE) { continue; + } + + /* Can't do motion pass if no motion vectors are available. */ + if (pass.type == PASS_MOTION || pass.type == PASS_MOTION_WEIGHT) { + if (scene->need_motion() != Scene::MOTION_PASS) { + kfilm->pass_stride += pass.components; + continue; + } + } int pass_flag = (1 << (pass.type % 32)); if(pass.type <= PASS_CATEGORY_MAIN_END) { |