[Bf-blender-cvs] [12628e0794a] master: Fix Cycles AVX unit test still failing to build with old GCC

Brecht Van Lommel noreply at git.blender.org
Thu Apr 2 18:31:39 CEST 2020


Commit: 12628e0794af1c1f1bfc7e39260c3c33b84984b4
Author: Brecht Van Lommel
Date:   Thu Apr 2 18:19:28 2020 +0200
Branches: master
https://developer.blender.org/rB12628e0794af1c1f1bfc7e39260c3c33b84984b4

Fix Cycles AVX unit test still failing to build with old GCC

===================================================================

M	intern/cycles/util/util_simd.h

===================================================================

diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h
index ac2893692df..de0e3c39f30 100644
--- a/intern/cycles/util/util_simd.h
+++ b/intern/cycles/util/util_simd.h
@@ -589,8 +589,8 @@ __forceinline __m128 _mm_round_ps_emu(__m128 value, const int flags)
 #    endif /* !(defined(__KERNEL_SSE41__) || defined(__SSE4_1__) || defined(__SSE4_2__)) */
 
 /* Older GCC versions do not have _mm256_cvtss_f32 yet, so define it ourselves.
- * _mm256_castps256_ps128 generates no instructions so this is jus as efficient. */
-#    ifdef __KERNEL_AVX__
+ * _mm256_castps256_ps128 generates no instructions so this is just as efficient. */
+#    if defined(__KERNEL_AVX__) || defined(__KERNEL_AVX2__)
 #      undef _mm256_cvtss_f32
 #      define _mm256_cvtss_f32(a) (_mm_cvtss_f32(_mm256_castps256_ps128(a)))
 #    endif



More information about the Bf-blender-cvs mailing list