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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-12-24 22:53:26 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-25 00:50:49 +0300
commit0feba652f787aa87a1eccd2911a6c713d2c8aeaf (patch)
treeaf0a89988d456eff26be00830e5a29eb2934e9da /intern/cycles/blender/blender_sync.cpp
parent03f28553ff07e9d79a92834188017d93de555ccb (diff)
Cycles: Enable QBVH optimization structure for SSE2 CPUs
This commit enables QBVH optimization structure automatically if rendering with CPU and SSE2 support is detected. This brings render time of agent shot back to the speed it used to be before the watertight intersections commit, single koro and sponza scenes are about 7% faster here.
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r--intern/cycles/blender/blender_sync.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index ee492dd00e4..f83eb113a88 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -353,7 +353,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
/* Scene Parameters */
-SceneParams BlenderSync::get_scene_params(BL::Scene b_scene, bool background)
+SceneParams BlenderSync::get_scene_params(BL::Scene b_scene, bool background, bool is_cpu)
{
BL::RenderSettings r = b_scene.render();
SceneParams params;
@@ -378,6 +378,13 @@ SceneParams BlenderSync::get_scene_params(BL::Scene b_scene, bool background)
else
params.persistent_data = false;
+ if(is_cpu) {
+ params.use_qbvh = system_cpu_support_sse2();
+ }
+ else {
+ params.use_qbvh = false;
+ }
+
return params;
}