diff options
author | Patrick Mours <pmours@nvidia.com> | 2019-09-12 15:50:06 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-13 12:50:11 +0300 |
commit | a2b52dc5716a97e5413acbd6eefc9ce3788b6456 (patch) | |
tree | 7e6d6c17b73671e67c1f7fbdadd821b4541f820f /intern/cycles/blender/blender_python.cpp | |
parent | 53932f1f068501bfb095c407a7777a964dc5ec1c (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/blender/blender_python.cpp')
-rw-r--r-- | intern/cycles/blender/blender_python.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp index 2bea6b34772..335d4daf09c 100644 --- a/intern/cycles/blender/blender_python.cpp +++ b/intern/cycles/blender/blender_python.cpp @@ -81,6 +81,8 @@ bool debug_flags_sync_from_scene(BL::Scene b_scene) /* Synchronize CUDA flags. */ flags.cuda.adaptive_compile = get_boolean(cscene, "debug_use_cuda_adaptive_compile"); flags.cuda.split_kernel = get_boolean(cscene, "debug_use_cuda_split_kernel"); + /* Synchronize OptiX flags. */ + flags.optix.cuda_streams = get_int(cscene, "debug_optix_cuda_streams"); /* Synchronize OpenCL device type. */ switch (get_enum(cscene, "debug_opencl_device_type")) { case 0: @@ -960,14 +962,16 @@ static PyObject *enable_print_stats_func(PyObject * /*self*/, PyObject * /*args* static PyObject *get_device_types_func(PyObject * /*self*/, PyObject * /*args*/) { vector<DeviceType> device_types = Device::available_types(); - bool has_cuda = false, has_opencl = false; + bool has_cuda = false, has_optix = false, has_opencl = false; foreach (DeviceType device_type, device_types) { has_cuda |= (device_type == DEVICE_CUDA); + has_optix |= (device_type == DEVICE_OPTIX); has_opencl |= (device_type == DEVICE_OPENCL); } - PyObject *list = PyTuple_New(2); + PyObject *list = PyTuple_New(3); PyTuple_SET_ITEM(list, 0, PyBool_FromLong(has_cuda)); - PyTuple_SET_ITEM(list, 1, PyBool_FromLong(has_opencl)); + PyTuple_SET_ITEM(list, 1, PyBool_FromLong(has_optix)); + PyTuple_SET_ITEM(list, 2, PyBool_FromLong(has_opencl)); return list; } |