diff options
author | Patrick Mours <pmours@nvidia.com> | 2021-05-25 17:56:16 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2021-05-25 17:56:16 +0300 |
commit | b046bc536bec914013c678b552ce6cef7dd308e6 (patch) | |
tree | 85a4650d260f2fdc250d433d51d7309b77f08510 | |
parent | 8cd506639a789694bb229698adad6de36bc1a26d (diff) |
Fix T88096: Baking with OptiX and displacement fails
Using displacement runs the shader eval kernel, but since OptiX modules are not loaded when
baking is active, those were not available and therefore failed to launch. This fixes that by falling
back to the CUDA kernels.
-rw-r--r-- | intern/cycles/device/device_optix.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp index 01de0724cb2..b008dfa376f 100644 --- a/intern/cycles/device/device_optix.cpp +++ b/intern/cycles/device/device_optix.cpp @@ -726,7 +726,11 @@ class OptiXDevice : public CUDADevice { } } else if (task.type == DeviceTask::SHADER) { - launch_shader_eval(task, thread_index); + // CUDA kernels are used when doing baking + if (optix_module == NULL) + CUDADevice::shader(task); + else + launch_shader_eval(task, thread_index); } else if (task.type == DeviceTask::DENOISE_BUFFER) { // Set up a single tile that covers the whole task and denoise it |