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.
This commit is contained in:
Sergey Sharybin
2014-12-25 00:53:26 +05:00
parent 03f28553ff
commit 0feba652f7
4 changed files with 21 additions and 7 deletions

View File

@@ -30,6 +30,7 @@
#include "util_cache.h"
#include "util_foreach.h"
#include "util_logging.h"
#include "util_progress.h"
#include "util_set.h"
@@ -980,6 +981,9 @@ void MeshManager::device_update_bvh(Device *device, DeviceScene *dscene, Scene *
/* bvh build */
progress.set_status("Updating Scene BVH", "Building");
VLOG(1) << (scene->params.use_qbvh ? "Using QBVH optimization structure"
: "Using regular BVH optimization structure");
BVHParams bparams;
bparams.top_level = true;
bparams.use_qbvh = scene->params.use_qbvh;