Compositor: Ensured 16 byte alignment for variables accessed by SSE instructions.
Before this patch, the XBlur/YBlur compositor nodes would crash for me when run in a MSVC 2015 debug build (test scene: BMW27_cpu). I added the compiler instructions to explicitly align the local variables that the SSE instructions are accessing.
This commit is contained in:
parent
8f9d9ba14e
commit
02bac54fa9
|
@ -85,6 +85,13 @@ 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 multiplier_accum = 0.0f;
|
||||
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
|
||||
|
|
|
@ -84,6 +84,13 @@ 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 multiplier_accum = 0.0f;
|
||||
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
|
||||
|
|
Loading…
Reference in New Issue