Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-11-10 12:13:19 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-11-10 12:13:19 +0300
commit7a6ad2901cce23d47c3a0618b4791d4eb034a6c5 (patch)
treeabf9644577d5b7adcfb196ea74b81c5ee9e7e4d1 /source/blender
parent7defb27f084288e0218f068aec74a693a0ca9b6a (diff)
parenta466d7ae248b2807b4e2f8693b458d3da509e9bc (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/BLI_compiler_attrs.h10
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp2
3 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/blenlib/BLI_compiler_attrs.h b/source/blender/blenlib/BLI_compiler_attrs.h
index 4c548654e33..2b6baa0d67b 100644
--- a/source/blender/blenlib/BLI_compiler_attrs.h
+++ b/source/blender/blenlib/BLI_compiler_attrs.h
@@ -94,10 +94,16 @@
/* Use to suppress '-Wimplicit-fallthrough' (in place of 'break'). */
#if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */
-#define ATTR_FALLTHROUGH __attribute__((fallthrough))
+# define ATTR_FALLTHROUGH __attribute__((fallthrough))
#else
-#define ATTR_FALLTHROUGH ((void)0)
+# define ATTR_FALLTHROUGH ((void)0)
#endif
+/* Declare the memory alignment in Bytes. */
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
+# define ATTR_ALIGN(x) __declspec(align(x))
+#else
+# define ATTR_ALIGN(x) __attribute__((aligned(x)))
+#endif
#endif /* __BLI_COMPILER_ATTRS_H__ */
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
index 29ed4334412..4d05ece7ef0 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
@@ -85,7 +85,7 @@ void GaussianXBlurOperation::updateGauss()
void GaussianXBlurOperation::executePixel(float output[4], int x, int y, void *data)
{
- float color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+ float ATTR_ALIGN(16) color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
float multiplier_accum = 0.0f;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
index 4b55333c08c..3203914b5a7 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
@@ -84,7 +84,7 @@ void GaussianYBlurOperation::updateGauss()
void GaussianYBlurOperation::executePixel(float output[4], int x, int y, void *data)
{
- float color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+ float ATTR_ALIGN(16) color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
float multiplier_accum = 0.0f;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();