Use compiler __SSE2__ definitions and C++11 alignas
ClosedPublic

Authored by gladhorn on Aug 13 2019, 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
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 15037
Build 15055: arc lint + arc unit
gladhorn created this revision.Aug 13 2019, 6:23 AM
Restricted Application added a project: KWin. · View Herald TranscriptAug 13 2019, 6:23 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
gladhorn requested review of this revision.Aug 13 2019, 6:23 AM
zzag added a subscriber: zzag.Aug 13 2019, 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.Aug 13 2019, 7:40 PM

Use #if defined consistently

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