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:
authorPatrick Mours <pmours@nvidia.com>2019-09-12 15:50:06 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-13 12:50:11 +0300
commita2b52dc5716a97e5413acbd6eefc9ce3788b6456 (patch)
tree7e6d6c17b73671e67c1f7fbdadd821b4541f820f /intern/cycles/util
parent53932f1f068501bfb095c407a7777a964dc5ec1c (diff)
Cycles: add Optix device backend
This uses hardware-accelerated raytracing on NVIDIA RTX graphics cards. It is still currently experimental. Most features are supported, but a few are still missing like baking, branched path tracing and using CPU memory. https://wiki.blender.org/wiki/Reference/Release_Notes/2.81/Cycles#NVIDIA_RTX For building with Optix support, the Optix SDK must be installed. See here for build instructions: https://wiki.blender.org/wiki/Building_Blender/CUDA Differential Revision: https://developer.blender.org/D5363
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_debug.cpp16
-rw-r--r--intern/cycles/util/util_debug.h14
2 files changed, 29 insertions, 1 deletions
diff --git a/intern/cycles/util/util_debug.cpp b/intern/cycles/util/util_debug.cpp
index e52fda26845..3ce65802cff 100644
--- a/intern/cycles/util/util_debug.cpp
+++ b/intern/cycles/util/util_debug.cpp
@@ -86,6 +86,16 @@ void DebugFlags::CUDA::reset()
split_kernel = false;
}
+DebugFlags::OptiX::OptiX()
+{
+ reset();
+}
+
+void DebugFlags::OptiX::reset()
+{
+ cuda_streams = 1;
+}
+
DebugFlags::OpenCL::OpenCL() : device_type(DebugFlags::OpenCL::DEVICE_ALL), debug(false)
{
reset();
@@ -130,6 +140,7 @@ void DebugFlags::reset()
viewport_static_bvh = false;
cpu.reset();
cuda.reset();
+ optix.reset();
opencl.reset();
}
@@ -145,7 +156,10 @@ std::ostream &operator<<(std::ostream &os, DebugFlagsConstRef debug_flags)
<< " Split : " << string_from_bool(debug_flags.cpu.split_kernel) << "\n";
os << "CUDA flags:\n"
- << " Adaptive Compile: " << string_from_bool(debug_flags.cuda.adaptive_compile) << "\n";
+ << " Adaptive Compile : " << string_from_bool(debug_flags.cuda.adaptive_compile) << "\n";
+
+ os << "OptiX flags:\n"
+ << " CUDA streams : " << debug_flags.optix.cuda_streams << "\n";
const char *opencl_device_type;
switch (debug_flags.opencl.device_type) {
diff --git a/intern/cycles/util/util_debug.h b/intern/cycles/util/util_debug.h
index 5b0004ea768..cf6b442b878 100644
--- a/intern/cycles/util/util_debug.h
+++ b/intern/cycles/util/util_debug.h
@@ -99,6 +99,17 @@ class DebugFlags {
bool split_kernel;
};
+ /* Descriptor of OptiX feature-set to be used. */
+ struct OptiX {
+ OptiX();
+
+ /* Reset flags to their defaults. */
+ void reset();
+
+ /* Number of CUDA streams to launch kernels concurrently from. */
+ int cuda_streams;
+ };
+
/* Descriptor of OpenCL feature-set to be used. */
struct OpenCL {
OpenCL();
@@ -165,6 +176,9 @@ class DebugFlags {
/* Requested CUDA flags. */
CUDA cuda;
+ /* Requested OptiX flags. */
+ OptiX optix;
+
/* Requested OpenCL flags. */
OpenCL opencl;