diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-12-22 17:07:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-12-22 17:08:59 +0300 |
commit | b2edc716c1311a11420c41ebd27dcac509685e2e (patch) | |
tree | e3429a3d186d5e29424021972563ac5783f7aaae | |
parent | dad5aded0cf6f69e15954b47a6e2f1d2e791d073 (diff) |
Fix Cycles OptiX runtime compilation broken after shader raytracing
Need to pass the appropriate flags as we do for compilation as part of the
CMake build.
-rw-r--r-- | intern/cycles/device/device_optix.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp index a721f426dfe..223a9e9d6c0 100644 --- a/intern/cycles/device/device_optix.cpp +++ b/intern/cycles/device/device_optix.cpp @@ -314,6 +314,14 @@ class OptiXDevice : public CUDADevice { common_cflags += string_printf(" -I\"%s/include\"", optix_sdk_path); } + // Specialization for shader raytracing + if (requested_features.use_shader_raytrace) { + common_cflags += " --keep-device-functions"; + } + else { + common_cflags += " -D __NO_SHADER_RAYTRACE__"; + } + return common_cflags; } |