[Bf-blender-cvs] [4b14b33ea88] master: Cycles: use packed float3 back for oneAPI
Xavier Hallade
noreply at git.blender.org
Wed Oct 26 10:53:49 CEST 2022
Commit: 4b14b33ea887e685937b7757af0c2093093b7c7e
Author: Xavier Hallade
Date: Wed Oct 26 10:35:18 2022 +0200
Branches: master
https://developer.blender.org/rB4b14b33ea887e685937b7757af0c2093093b7c7e
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
===================================================================
M intern/cycles/util/types_float3.h
===================================================================
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. */
More information about the Bf-blender-cvs
mailing list