forked from bartvdbraak/blender
Fix #32972: cycles crash changing to GPU render with OSL enabled.
This commit is contained in:
parent
dcca228906
commit
3f0fe65635
@ -284,6 +284,8 @@ static PyObject *osl_update_node_func(PyObject *self, PyObject *args)
|
||||
if(param->validdefault)
|
||||
default_string = param->sdefault[0];
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
else
|
||||
continue;
|
||||
|
@ -44,6 +44,10 @@ Scene::Scene(const SceneParams& params_, const DeviceInfo& device_info_)
|
||||
device = NULL;
|
||||
memset(&dscene.data, 0, sizeof(dscene.data));
|
||||
|
||||
/* OSL only works on the CPU */
|
||||
if(device_info_.type != DEVICE_CPU)
|
||||
params.shadingsystem = SceneParams::SVM;
|
||||
|
||||
camera = new Camera();
|
||||
filter = new Filter();
|
||||
film = new Film();
|
||||
|
Loading…
Reference in New Issue
Block a user