Fix #33405: preview render getting stuck in a particular .blend file, ObjectKey

operator< had wrong brackets, changed it now to be more clear.

Fix #33404: crash GPU rendering with OSL option still enabled. There was a check
to disable OSL in this case, but it shouldn't have modified scene->params because
this is used for comparison in scene->modified().
This commit is contained in:
Brecht Van Lommel
2012-12-04 07:48:09 +00:00
parent c0078a9879
commit a9d889cba4
8 changed files with 35 additions and 16 deletions

View File

@@ -44,10 +44,6 @@ 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();
@@ -57,9 +53,14 @@ Scene::Scene(const SceneParams& params_, const DeviceInfo& device_info_)
object_manager = new ObjectManager();
integrator = new Integrator();
image_manager = new ImageManager();
shader_manager = ShaderManager::create(this);
particle_system_manager = new ParticleSystemManager();
/* OSL only works on the CPU */
if(device_info_.type == DEVICE_CPU)
shader_manager = ShaderManager::create(this, params.shadingsystem);
else
shader_manager = ShaderManager::create(this, SceneParams::SVM);
if (device_info_.type == DEVICE_CPU)
image_manager->set_extended_image_limits();
}