From 5cbfdaccd0af7537f2e5c4c777d3edae1ce4645a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 11 Aug 2022 16:59:29 +0200 Subject: Cleanup: minor changes to DebugFlags Use C++11, remove unused running_inside_blender and move viewport_static_bvh to BlenderSync. --- intern/cycles/util/debug.cpp | 10 ++++------ intern/cycles/util/debug.h | 31 ++++++++++--------------------- 2 files changed, 14 insertions(+), 27 deletions(-) (limited to 'intern/cycles/util') diff --git a/intern/cycles/util/debug.cpp b/intern/cycles/util/debug.cpp index faa54a92c24..8210e21f951 100644 --- a/intern/cycles/util/debug.cpp +++ b/intern/cycles/util/debug.cpp @@ -13,7 +13,6 @@ CCL_NAMESPACE_BEGIN DebugFlags::CPU::CPU() - : avx2(true), avx(true), sse41(true), sse3(true), sse2(true), bvh_layout(BVH_LAYOUT_AUTO) { reset(); } @@ -41,17 +40,17 @@ void DebugFlags::CPU::reset() bvh_layout = BVH_LAYOUT_AUTO; } -DebugFlags::CUDA::CUDA() : adaptive_compile(false) +DebugFlags::CUDA::CUDA() { reset(); } -DebugFlags::HIP::HIP() : adaptive_compile(false) +DebugFlags::HIP::HIP() { reset(); } -DebugFlags::Metal::Metal() : adaptive_compile(false) +DebugFlags::Metal::Metal() { reset(); } @@ -84,14 +83,13 @@ void DebugFlags::OptiX::reset() use_debug = false; } -DebugFlags::DebugFlags() : viewport_static_bvh(false), running_inside_blender(false) +DebugFlags::DebugFlags() { /* Nothing for now. */ } void DebugFlags::reset() { - viewport_static_bvh = false; cpu.reset(); cuda.reset(); optix.reset(); diff --git a/intern/cycles/util/debug.h b/intern/cycles/util/debug.h index 3565fdea17f..ab200649f59 100644 --- a/intern/cycles/util/debug.h +++ b/intern/cycles/util/debug.h @@ -17,11 +17,6 @@ CCL_NAMESPACE_BEGIN */ class DebugFlags { public: - /* Use static BVH in viewport, to match final render exactly. */ - bool viewport_static_bvh; - - bool running_inside_blender; - /* Descriptor of CPU feature-set to be used. */ struct CPU { CPU(); @@ -30,11 +25,11 @@ class DebugFlags { void reset(); /* Flags describing which instructions sets are allowed for use. */ - bool avx2; - bool avx; - bool sse41; - bool sse3; - bool sse2; + bool avx2 = true; + bool avx = true; + bool sse41 = true; + bool sse3 = true; + bool sse2 = true; /* Check functions to see whether instructions up to the given one * are allowed for use. @@ -65,7 +60,7 @@ class DebugFlags { * By default the fastest will be used. For debugging the BVH used by other * CPUs and GPUs can be selected here instead. */ - BVHLayout bvh_layout; + BVHLayout bvh_layout = BVH_LAYOUT_AUTO; }; /* Descriptor of CUDA feature-set to be used. */ @@ -77,7 +72,7 @@ class DebugFlags { /* Whether adaptive feature based runtime compile is enabled or not. * Requires the CUDA Toolkit and only works on Linux at the moment. */ - bool adaptive_compile; + bool adaptive_compile = false; }; /* Descriptor of HIP feature-set to be used. */ @@ -88,7 +83,7 @@ class DebugFlags { void reset(); /* Whether adaptive feature based runtime compile is enabled or not. */ - bool adaptive_compile; + bool adaptive_compile = false; }; /* Descriptor of OptiX feature-set to be used. */ @@ -100,7 +95,7 @@ class DebugFlags { /* Load OptiX module with debug capabilities. Will lower logging verbosity level, enable * validations, and lower optimization level. */ - bool use_debug; + bool use_debug = false; }; /* Descriptor of Metal feature-set to be used. */ @@ -111,7 +106,7 @@ class DebugFlags { void reset(); /* Whether adaptive feature based runtime compile is enabled or not. */ - bool adaptive_compile; + bool adaptive_compile = false; }; /* Get instance of debug flags registry. */ @@ -142,15 +137,9 @@ class DebugFlags { private: DebugFlags(); -#if (__cplusplus > 199711L) public: explicit DebugFlags(DebugFlags const & /*other*/) = delete; void operator=(DebugFlags const & /*other*/) = delete; -#else - private: - explicit DebugFlags(DebugFlags const & /*other*/); - void operator=(DebugFlags const & /*other*/); -#endif }; typedef DebugFlags &DebugFlagsRef; -- cgit v1.2.3