From e3a79258d17e6cdca26120eab7a2c48c7c4d4a0f Mon Sep 17 00:00:00 2001 From: Martijn Berger Date: Fri, 22 Nov 2013 14:16:47 +0100 Subject: Cycles: test code for sse 4.1 kernel and alignment for some vector types. This is mostly work towards enabling the __KERNEL_SSE__ option to start using SIMD operations for vector math operations. This 4.1 kernel performes about 8% faster with that option but overall is still slower than without the option. WITH_CYCLES_OPTIMIZED_KERNEL_SSE41 is the cmake flag for testing this kernel. Alignment of int3, int4, float3, float4 to 16 bytes seems to give a slight 1-2% speedup on tested systems with the current kernel already, so is enabled now. --- intern/cycles/kernel/kernel.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'intern/cycles/kernel/kernel.h') diff --git a/intern/cycles/kernel/kernel.h b/intern/cycles/kernel/kernel.h index 361f5b0856d..105a3887da0 100644 --- a/intern/cycles/kernel/kernel.h +++ b/intern/cycles/kernel/kernel.h @@ -61,6 +61,15 @@ void kernel_cpu_sse3_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, floa float sample_scale, int x, int y, int offset, int stride); void kernel_cpu_sse3_shader(KernelGlobals *kg, uint4 *input, float4 *output, int type, int i); + +void kernel_cpu_sse41_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state, + int sample, int x, int y, int offset, int stride); +void kernel_cpu_sse41_convert_to_byte(KernelGlobals *kg, uchar4 *rgba, float *buffer, + float sample_scale, int x, int y, int offset, int stride); +void kernel_cpu_sse41_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, float *buffer, + float sample_scale, int x, int y, int offset, int stride); +void kernel_cpu_sse41_shader(KernelGlobals *kg, uint4 *input, float4 *output, + int type, int i); #endif CCL_NAMESPACE_END -- cgit v1.2.3