diff --git a/intern/cycles/integrator/denoiser_oidn_gpu.cpp b/intern/cycles/integrator/denoiser_oidn_gpu.cpp index c4564b7a859..df1464fdf0c 100644 --- a/intern/cycles/integrator/denoiser_oidn_gpu.cpp +++ b/intern/cycles/integrator/denoiser_oidn_gpu.cpp @@ -27,13 +27,10 @@ CCL_NAMESPACE_BEGIN -/* Ideally, this would be dynamic and adaptively change when the runtime runs out of memory. */ -constexpr int prefilter_max_mem = 1024; - -thread_mutex OIDNDenoiserGPU::mutex_; -bool OIDNDenoiserGPU::is_device_type_supported(const DeviceType &type) +bool OIDNDenoiserGPU::is_device_supported(const DeviceInfo &device) { - switch (type) { + /* Currently falls back to checking just the device type, can be improved. */ + switch (device.type) { # ifdef OIDN_DEVICE_SYCL /* Assume all devices with Cycles support are also supported by OIDN2. */ case DEVICE_ONEAPI: @@ -44,12 +41,6 @@ bool OIDNDenoiserGPU::is_device_type_supported(const DeviceType &type) } } -bool OIDNDenoiserGPU::is_device_supported(const DeviceInfo &device) -{ - /* Currently falls back to checking just the device type, can be improved. */ - return is_device_type_supported(device.type); -} - OIDNDenoiserGPU::OIDNDenoiserGPU(Device *path_trace_device, const DenoiseParams ¶ms) : DenoiserGPU(path_trace_device, params) { @@ -156,7 +147,6 @@ bool OIDNDenoiserGPU::denoise_create_if_needed(DenoiseContext &context) if (context.use_pass_albedo) { albedo_filter_ = create_filter(); if (albedo_filter_ == nullptr) { - oidnSetFilterInt(oidn_filter_, "maxMemoryMB", prefilter_max_mem); return false; } } @@ -164,7 +154,6 @@ bool OIDNDenoiserGPU::denoise_create_if_needed(DenoiseContext &context) if (context.use_pass_normal) { normal_filter_ = create_filter(); if (normal_filter_ == nullptr) { - oidnSetFilterInt(oidn_filter_, "maxMemoryMB", prefilter_max_mem); return false; } } diff --git a/intern/cycles/integrator/denoiser_oidn_gpu.h b/intern/cycles/integrator/denoiser_oidn_gpu.h index bd815140956..4d41a295c94 100644 --- a/intern/cycles/integrator/denoiser_oidn_gpu.h +++ b/intern/cycles/integrator/denoiser_oidn_gpu.h @@ -34,15 +34,10 @@ class OIDNDenoiserGPU : public DenoiserGPU { bool allow_inplace_modification) override; static bool is_device_supported(const DeviceInfo &device); - static bool is_device_type_supported(const DeviceType &type); protected: virtual uint get_device_type_mask() const override; - /* We only perform one denoising at a time, since OpenImageDenoise itself is multithreaded. - * Use this mutex whenever images are passed to the OIDN and needs to be denoised. */ - static thread_mutex mutex_; - /* Create OIDN denoiser descriptor if needed. * Will do nothing if the current OIDN descriptor is usable for the given parameters. * If the OIDN denoiser descriptor did re-allocate here it is left unconfigured. */