From 4b14b33ea887e685937b7757af0c2093093b7c7e Mon Sep 17 00:00:00 2001 From: Xavier Hallade Date: Wed, 26 Oct 2022 10:35:18 +0200 Subject: Cycles: use packed float3 back for oneAPI This fixes a 15% performance regression silently introduced by 79ab76e156d4bde937335be784cdf220294600d5 that aligned the compact float3 on 16 bytes for oneAPI. Current change is minimalist, there are further cleanup opportunities such as removing packed_float3 definition for oneAPI but for some reason, it cuts the recovered speedup in half, so we're starting with this small fix for now. Reviewed by: brecht Differential Revision: https://developer.blender.org/D16340 --- intern/cycles/util/types_float3.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/intern/cycles/util/types_float3.h b/intern/cycles/util/types_float3.h index 87c6b1d3654..34430945c38 100644 --- a/intern/cycles/util/types_float3.h +++ b/intern/cycles/util/types_float3.h @@ -10,7 +10,12 @@ CCL_NAMESPACE_BEGIN #ifndef __KERNEL_NATIVE_VECTOR_TYPES__ +# ifdef __KERNEL_ONEAPI__ +/* Define float3 as packed for oneAPI. */ +struct float3 +# else struct ccl_try_align(16) float3 +# endif { # ifdef __KERNEL_GPU__ /* Compact structure for GPU. */ -- cgit v1.2.3