Cycles: Expose QBVH on/off switch to the UI.
authorThomas Dinges <blender@dingto.org>
Thu, 25 Dec 2014 01:19:14 +0000 (02:19 +0100)
committerThomas Dinges <blender@dingto.org>
Thu, 25 Dec 2014 01:19:14 +0000 (02:19 +0100)
We might remove this again in the future, but for testing purposes
during the release cycle, this will be useful.

The setting defaults to QBVH, and can be found in the Performance panel.

intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_sync.cpp

index 9459b750bd113ecd6902a529e83e1c90946be82d..0829f1cfbed3cebad654e3fd7b0403a18c1588ac 100644 (file)
@@ -456,6 +456,11 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 description="Use BVH spatial splits: longer builder time, faster render",
                 default=False,
                 )
+        cls.use_qbvh = BoolProperty(
+                name="Use QBVH",
+                description="Use QBVH acceleration structure",
+                default=True,
+                )
         cls.use_cache = BoolProperty(
                 name="Cache BVH",
                 description="Cache last built BVH to disk for faster re-render if no geometry changed",
index 9b1e20d3c8f0a0b2c05852c4240e3aee9329bc38..52964ca0df4d0d6b8ace93e401e3dcec97725100 100644 (file)
@@ -320,6 +320,7 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
 
         col.label(text="Acceleration structure:")
         col.prop(cscene, "debug_use_spatial_splits")
+        col.prop(cscene, "use_qbvh")
 
 
 class CyclesRender_PT_layer_options(CyclesButtonsPanel, Panel):
index f83eb113a88a32e1be38f166cd7f93942ccdf0c1..2fb2b6d840d0d49f7bd08dbeb9d6b83da8bc4be5 100644 (file)
@@ -379,7 +379,7 @@ SceneParams BlenderSync::get_scene_params(BL::Scene b_scene, bool background, bo
                params.persistent_data = false;
 
        if(is_cpu) {
-               params.use_qbvh = system_cpu_support_sse2();
+               params.use_qbvh = system_cpu_support_sse2() && RNA_boolean_get(&cscene, "use_qbvh");
        }
        else {
                params.use_qbvh = false;