Use compiler __SSE2__ definitions and C++11 alignas
ClosedPublic

Authored by gladhorn on Tue, Aug 13, 6:23 AM.

Details

Summary

Since C++11 alignas is a keyword, so we don't need to create our own.
All relevant compilers (gcc, clang, icc) define SSE2, so just use that.

There seem to be frequent crashes in the quad version of this code, but
this change should not make any difference from what I can tell.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gladhorn created this revision.Tue, Aug 13, 6:23 AM
Restricted Application added a project: KWin. · View Herald TranscriptTue, Aug 13, 6:23 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
gladhorn requested review of this revision.Tue, Aug 13, 6:23 AM
zzag added a subscriber: zzag.Tue, Aug 13, 8:31 AM

There seem to be frequent crashes in the quad version of this code, but
this change should not make any difference from what I can tell.

I doubt that kwin crashes because of alignment issues. I suggest looking into whether GLVertexBuffer::streamingBuffer() is still valid.

libkwineffects/kwineffects.cpp
1137

Stick only with either ifdef or if defined. Mixing both can be confusing for some people.

In D23120#511135, @zzag wrote:

There seem to be frequent crashes in the quad version of this code, but
this change should not make any difference from what I can tell.

I doubt that kwin crashes because of alignment issues. I suggest looking into whether GLVertexBuffer::streamingBuffer() is still valid.

I agree, I first thought the alignment would be the problem, but after reading the code, I don't see how it would be an issue, thanks for the tip.

libkwineffects/kwineffects.cpp
1137

Agree, that was sloppy.

gladhorn updated this revision to Diff 63679.Tue, Aug 13, 7:40 PM

Use #if defined consistently

zzag accepted this revision.Tue, Aug 13, 8:27 PM
This revision is now accepted and ready to land.Tue, Aug 13, 8:27 PM
This revision was automatically updated to reflect the committed changes.