A better place for the OS X glFinish() fix
AbandonedPublic

Authored by poke1024 on Sep 28 2017, 9:32 AM.

Details

Reviewers
rempt
Group Reviewers
Krita
Summary

This seems to be a better place to fix the OS X driver bug via glFinish; glFinish() will get called much less frequently and add less delay.

It seems to me (subjectively) that this further improves accuracy on OS X, though I have no objective measurements right now.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
poke1024 created this revision.Sep 28 2017, 9:32 AM

I don't know much about OpenGL, but I wonder if the glFinish call is even needed at all? How about replacing it with glFlush?

I'll also need to check any changes on Windows with both desktop OpenGL and ANGLE.

rempt accepted this revision.Sep 28 2017, 11:01 AM
rempt added a subscriber: rempt.

I'd be tempted to put the entire change, in KisCanvas2 too, within #ifdef Q_OS_OSX for clarity's sake. It shouldn't make any difference on any other OS, because it only moves the Q_OS_OSX block of code.

This revision is now accepted and ready to land.Sep 28 2017, 11:01 AM
In D8023#149869, @rempt wrote:

It shouldn't make any difference on any other OS, because it only moves the Q_OS_OSX block of code.

You're right, didn't realize this is behind an ifdef :P

Yes, it's an OS X only bug fix. It actually needs glFinish (full synchronous stop, argh), I tried glFlush and then you get artefacts (at least with mip mapping texture modes).

I'm currently investigating getting rid of the glFinish altogether, by (1) using fences or (2) using double buffered pixel buffers. Might actually abandon this if one of the other approaches works.

May I ask which Qt version are you testing with? The current OS X release is using Qt 5.7.0 but Boud will be checking if it's worth updating to Qt 5.9.2 (specifically for https://bugreports.qt.io/browse/QTBUG-61384).

(Related: https://bugs.kde.org/show_bug.cgi?id=373676)

Now superseded by D8418.

@alvinhochun Hi Alvin, sorry for the late reply, I didn't see this one. I'm locally still testing using QT 5.9.1.

poke1024 abandoned this revision.Oct 28 2017, 10:54 AM