From c60366c01fc77b83868bf8080bcf2cb48a4edadf Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 6 Mar 2020 15:26:54 +0100 Subject: [PATCH] Cycles: cleanup warning --- intern/cycles/device/device_cpu.cpp | 9 ++++----- intern/cycles/device/device_optix.cpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp index 6a9671961ab..16e9f2d4340 100644 --- a/intern/cycles/device/device_cpu.cpp +++ b/intern/cycles/device/device_cpu.cpp @@ -830,7 +830,7 @@ class CPUDevice : public Device { return true; } - bool adaptive_sampling_filter(KernelGlobals *kg, RenderTile &tile, int sample) + bool adaptive_sampling_filter(KernelGlobals *kg, RenderTile &tile) { WorkTile wtile; wtile.x = tile.x; @@ -848,11 +848,10 @@ class CPUDevice : public Device { for (int x = tile.x; x < tile.x + tile.w; ++x) { any |= kernel_do_adaptive_filter_y(kg, x, &wtile); } - return (!any); } - void adaptive_sampling_post(const DeviceTask &task, const RenderTile &tile, KernelGlobals *kg) + void adaptive_sampling_post(const RenderTile &tile, KernelGlobals *kg) { float *render_buffer = (float *)tile.buffer; for (int y = tile.y; y < tile.y + tile.h; y++) { @@ -911,7 +910,7 @@ class CPUDevice : public Device { task.update_progress(&tile, tile.w * tile.h); if (task.adaptive_sampling.use && task.adaptive_sampling.need_filter(sample)) { - const bool stop = adaptive_sampling_filter(kg, tile, sample); + const bool stop = adaptive_sampling_filter(kg, tile); if (stop) { tile.sample = end_sample; break; @@ -923,7 +922,7 @@ class CPUDevice : public Device { } if (task.adaptive_sampling.use) { - adaptive_sampling_post(task, tile, kg); + adaptive_sampling_post(tile, kg); } } diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp index 30d624fdf7c..6983c35799d 100644 --- a/intern/cycles/device/device_optix.cpp +++ b/intern/cycles/device/device_optix.cpp @@ -672,7 +672,7 @@ class OptiXDevice : public CUDADevice { // Run the adaptive sampling kernels at selected samples aligned to step samples. uint filter_sample = wtile.start_sample + wtile.num_samples - 1; if (task.adaptive_sampling.use && task.adaptive_sampling.need_filter(filter_sample)) { - adaptive_sampling_filter(filter_sample, &wtile, d_wtile_ptr, cuda_stream[thread_index]); + adaptive_sampling_filter(&wtile, d_wtile_ptr, cuda_stream[thread_index]); } // Wait for launch to finish