Skip to content

Commit 5612dcb

Browse files
Re-enabling PerPixelMath_sse (issue #84)
1 parent 4a44902 commit 5612dcb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libprojectM/MilkdropPresetFactory/PresetFrameIO.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void PresetInputs::update(const BeatDetect & music, const PipelineContext & cont
3535
float **alloc_mesh(size_t gx, size_t gy)
3636
{
3737
// round gy up to multiple 4 (for possible SSE optimization)
38-
// gy = (gy+3) & ~(size_t)3;
38+
gy = (gy+3) & ~(size_t)3;
3939

4040
float **mesh = (float **)wipe_aligned_alloc(gx * sizeof(float *));
4141
float *m = (float *)wipe_aligned_alloc(gx * gy * sizeof(float));
@@ -236,7 +236,7 @@ inline __m128 _mm_pow(__m128 x, __m128 y)
236236
float X[4];
237237
float Y[4];
238238
_mm_store_ps(X,x);
239-
_mm_store_ps(Y,x);
239+
_mm_store_ps(Y,y);
240240
X[0] = __builtin_powf(X[0],Y[0]);
241241
X[1] = __builtin_powf(X[1],Y[1]);
242242
X[2] = __builtin_powf(X[2],Y[2]);
@@ -441,11 +441,11 @@ void PresetOutputs::PerPixelMath_sse(const PipelineContext &context)
441441

442442
void PresetOutputs::PerPixelMath(const PipelineContext &context)
443443
{
444-
//#ifdef __SSE2__
445-
// PerPixelMath_sse(context);
446-
//#else
444+
#ifdef __SSE2__
445+
PerPixelMath_sse(context);
446+
#else
447447
PerPixelMath_c(context);
448-
//#endif
448+
#endif
449449
}
450450

451451

0 commit comments

Comments
 (0)