From 2f79d1c0584f4d72984e56db1f5878be3360e044 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 19 Jan 2018 10:59:58 +0100 Subject: Cycles: Replace use_qbvh boolean flag with an enum-based property This was we can introduce other types of BVH, for example, wider ones, without causing too much mess around boolean flags. Thoughs: - Ideally device info should probably return bitflag of what BVH types it supports. It is possible to implement based on simple logic in device/ and mesh.cpp, rest of the changes will stay the same. - Not happy with workarounds in util_debug and duplicated enum in kernel. Maybe enbum should be stores in kernel, but then it's kind of weird to include kernel types from utils. Soudns some cyclkic dependency. Reviewers: brecht, maxim_d33 Reviewed By: brecht Differential Revision: https://developer.blender.org/D3011 --- intern/cycles/util/util_debug.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'intern/cycles/util/util_debug.h') diff --git a/intern/cycles/util/util_debug.h b/intern/cycles/util/util_debug.h index ec38cd373ba..f17f8a560ee 100644 --- a/intern/cycles/util/util_debug.h +++ b/intern/cycles/util/util_debug.h @@ -20,6 +20,8 @@ #include #include +#include "bvh/bvh_params.h" + CCL_NAMESPACE_BEGIN /* Global storage for all sort of flags used to fine-tune behavior of particular @@ -54,8 +56,12 @@ public: bool has_sse3() { return has_sse2() && sse3; } bool has_sse2() { return sse2; } - /* Whether QBVH usage is allowed or not. */ - bool qbvh; + /* Requested BVH size. + * + * Rendering will use widest possible BVH which is below or equal + * this one. + */ + BVHLayout bvh_layout; /* Whether split kernel is used */ bool split_kernel; -- cgit v1.2.3