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-05 23:01:23 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-11-06 00:04:36 +0300
commit97ff37bf54474efbce39653a1387ad55091d4964 (patch)
tree58ff9592807dbd98d126b179627e5c56f5309956 /intern/cycles/integrator/pass_accessor_cpu.h
parentd1a9425a2fde32b6786b333ab55661da507e818b (diff)
Cycles: perform CPU film reading in the kernel, to use AVX2 half conversion
Adds a bunch of CPU kernel function to process on row of pixels, and use those instead of calling unoptimized implementations. Fixes T92598
Diffstat (limited to 'intern/cycles/integrator/pass_accessor_cpu.h')
-rw-r--r--intern/cycles/integrator/pass_accessor_cpu.h32
1 files changed, 14 insertions, 18 deletions
diff --git a/intern/cycles/integrator/pass_accessor_cpu.h b/intern/cycles/integrator/pass_accessor_cpu.h
index 0313dc5bb0d..9ed38ab256e 100644
--- a/intern/cycles/integrator/pass_accessor_cpu.h
+++ b/intern/cycles/integrator/pass_accessor_cpu.h
@@ -16,6 +16,8 @@
#pragma once
+#include "device/cpu/kernel.h"
+
#include "integrator/pass_accessor.h"
CCL_NAMESPACE_BEGIN
@@ -28,25 +30,19 @@ class PassAccessorCPU : public PassAccessor {
using PassAccessor::PassAccessor;
protected:
- template<typename Processor>
- inline void run_get_pass_kernel_processor(const RenderBuffers *render_buffers,
- const BufferParams &buffer_params,
- const Destination &destination,
- const Processor &processor) const;
-
- template<typename Processor>
- inline void run_get_pass_kernel_processor_float(const KernelFilmConvert *kfilm_convert,
- const RenderBuffers *render_buffers,
- const BufferParams &buffer_params,
- const Destination &destination,
- const Processor &processor) const;
+ inline void run_get_pass_kernel_processor_float(
+ const KernelFilmConvert *kfilm_convert,
+ const RenderBuffers *render_buffers,
+ const BufferParams &buffer_params,
+ const Destination &destination,
+ const CPUKernels::FilmConvertFunction func) const;
- template<typename Processor>
- inline void run_get_pass_kernel_processor_half_rgba(const KernelFilmConvert *kfilm_convert,
- const RenderBuffers *render_buffers,
- const BufferParams &buffer_params,
- const Destination &destination,
- const Processor &processor) const;
+ inline void run_get_pass_kernel_processor_half_rgba(
+ const KernelFilmConvert *kfilm_convert,
+ const RenderBuffers *render_buffers,
+ const BufferParams &buffer_params,
+ const Destination &destination,
+ const CPUKernels::FilmConvertHalfRGBAFunction func) const;
#define DECLARE_PASS_ACCESSOR(pass) \
virtual void get_pass_##pass(const RenderBuffers *render_buffers, \