Fix T59792: Cycles crash rendering motion pass with motion blur enabled.
This commit is contained in:
parent
0ee97bd5c4
commit
f694d37929
Notes:
blender-bot
2023-02-14 09:21:21 +01:00
Referenced by issue #59792, unlocated crash
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue