Moved alignment attributes from my last commit to BLI_compiler_attrs.h for future use.
This commit is contained in:
parent
83d9f8e379
commit
df886b178c
Notes:
blender-bot
2023-02-14 06:17:20 +01:00
Referenced by issue #53683, 2.79a release
|
@ -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__ */
|
||||
|
|
|
@ -85,14 +85,7 @@ void GaussianXBlurOperation::updateGauss()
|
|||
|
||||
void GaussianXBlurOperation::executePixel(float output[4], int x, int y, void *data)
|
||||
{
|
||||
#ifdef __SSE2__
|
||||
# if defined(_WIN32) && !defined(FREE_WINDOWS)
|
||||
__declspec(align(16))
|
||||
# else
|
||||
__attribute__((aligned(16)))
|
||||
# endif
|
||||
#endif
|
||||
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();
|
||||
|
|
|
@ -84,14 +84,7 @@ void GaussianYBlurOperation::updateGauss()
|
|||
|
||||
void GaussianYBlurOperation::executePixel(float output[4], int x, int y, void *data)
|
||||
{
|
||||
#ifdef __SSE2__
|
||||
# if defined(_WIN32) && !defined(FREE_WINDOWS)
|
||||
__declspec(align(16))
|
||||
# else
|
||||
__attribute__((aligned(16)))
|
||||
# endif
|
||||
#endif
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue