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:
authorBrecht Van Lommel <brecht@blender.org>2022-08-11 17:59:29 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-08-11 18:03:10 +0300
commit5cbfdaccd0af7537f2e5c4c777d3edae1ce4645a (patch)
tree7fb4b341e04927312a38109b73fb5b30b37f67af /intern/cycles/util
parent4cbd799373d07498813ad84f8cee5f3a8c269631 (diff)
Cleanup: minor changes to DebugFlags
Use C++11, remove unused running_inside_blender and move viewport_static_bvh to BlenderSync.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/debug.cpp10
-rw-r--r--intern/cycles/util/debug.h31
2 files changed, 14 insertions, 27 deletions
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;