Fix: Cycles denoise fails with multi tile render and Use GPU off

This commit is contained in:
Brecht Van Lommel 2024-02-09 15:11:21 +01:00
parent f98468c988
commit 1e1a8d5c8f
3 changed files with 10 additions and 1 deletions

View File

@ -1002,6 +1002,9 @@ void PathTrace::process_full_buffer_from_disk(string_view filename)
if (denoise_params.use) {
progress_set_status(layer_view_name, "Denoising");
/* If GPU should be used is not based on file metadata. */
denoise_params.use_gpu = render_scheduler_.is_denoiser_gpu_used();
/* Re-use the denoiser as much as possible, avoiding possible device re-initialization.
*
* It will not conflict with the regular rendering as:

View File

@ -46,6 +46,11 @@ void RenderScheduler::set_denoiser_params(const DenoiseParams &params)
denoiser_params_ = params;
}
bool RenderScheduler::is_denoiser_gpu_used() const
{
return denoiser_params_.use_gpu;
}
void RenderScheduler::set_limit_samples_per_update(const int limit_samples)
{
limit_samples_per_update_ = limit_samples;

View File

@ -99,8 +99,9 @@ class RenderScheduler {
bool is_background() const;
void set_denoiser_params(const DenoiseParams &params);
void set_adaptive_sampling(const AdaptiveSampling &adaptive_sampling);
bool is_denoiser_gpu_used() const;
void set_adaptive_sampling(const AdaptiveSampling &adaptive_sampling);
bool is_adaptive_sampling_used() const;
/* Start sample for path tracing.