Use SIMD SSE functionality when available for 4x4 matrix multiplies. Slightly improves performance of large numbers of love.graphics.draw(texture) calls.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-12-28 04:05:52 -04:00
parent 5fc076a8fb
commit 4ef91ed79f
2 changed files with 53 additions and 3 deletions
+16
View File
@@ -60,6 +60,22 @@
# define LOVE_LITTLE_ENDIAN 1
#endif
// SSE instructions.
#if defined(__SSE__)
# define LOVE_SIMD_SSE
#elif defined(_MSC_VER)
# if defined(_M_AMD64) || defined(_M_X64)
# define LOVE_SIMD_SSE
# elif _M_IX86_FP
# define LOVE_SIMD_SSE
# endif
#endif
// NEON instructions.
#if defined(__ARM_NEON)
# define LOVE_SIMD_NEON
#endif
// Warnings.
#ifndef _CRT_SECURE_NO_WARNINGS
# define _CRT_SECURE_NO_WARNINGS