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>2021-11-01 00:11:36 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-11-01 10:36:50 +0300
commit0ab1b19de4da2db53548d82d66c8ea5ed40e0f6c (patch)
tree3334f8a6229613a8f9f72311c15d9d3512952d3d
parentcedc80c08d8340cb7db8af52051f9a6f9469fcb7 (diff)
Fix T92684: Cycles does not fall back to OIDN if OptiX is not available
-rw-r--r--intern/cycles/integrator/denoiser.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/intern/cycles/integrator/denoiser.cpp b/intern/cycles/integrator/denoiser.cpp
index b6ca96faebf..b89024e0c85 100644
--- a/intern/cycles/integrator/denoiser.cpp
+++ b/intern/cycles/integrator/denoiser.cpp
@@ -29,23 +29,11 @@ unique_ptr<Denoiser> Denoiser::create(Device *path_trace_device, const DenoisePa
{
DCHECK(params.use);
- switch (params.type) {
- case DENOISER_OPTIX:
- return make_unique<OptiXDenoiser>(path_trace_device, params);
-
- case DENOISER_OPENIMAGEDENOISE:
- return make_unique<OIDNDenoiser>(path_trace_device, params);
-
- case DENOISER_NUM:
- case DENOISER_NONE:
- case DENOISER_ALL:
- /* pass */
- break;
+ if (params.type == DENOISER_OPTIX && Device::available_devices(DEVICE_MASK_OPTIX).size()) {
+ return make_unique<OptiXDenoiser>(path_trace_device, params);
}
- LOG(FATAL) << "Unhandled denoiser type " << params.type << ", should never happen.";
-
- return nullptr;
+ return make_unique<OIDNDenoiser>(path_trace_device, params);
}
Denoiser::Denoiser(Device *path_trace_device, const DenoiseParams &params)