[Mesa-users] another serious issue with OpenGL on Linux

Gianluca Natale natale at europe.altair.com
Mon Sep 24 13:26:07 UTC 2018


Hi again.
I'm very new to Mesa, as I said last week, and I have very serious issues about using OpenGL on Linux.
The OpenGL code I wrote works fine on Windows, but has several issues on Linux.
As I have already said, I'm using a VM Linux machine, and when I run my OpenGL application, it prints out this:

Vendor         :     VMware, Inc.
Renderer       :     Gallium 0.4 on llvmpipe (LLVM 3.6, 256 bits)
OpenGL Version :     2.1 Mesa 11.0.7

So, yes, it is using a software emulation of OpenGL.
My application creates a QGLWidget with a default rendering context (so, double buffered).
It works fine, until I try to copy a part of the front buffer into the back buffer. From that point on, it starts flickering, as if it renders in the front buffer directly.
The significant fragment of my code is this (NOTE THAT I'M EXCLUDING THE REAL COPY OF THE BUFFER HERE BELOW, BECAUSE
I'VE DISCOVERED THAT THE ISSUE IS TRIGGERED MUCH SIMPLY EVEN WITHOUT PERFORMING THE COPY).

        GLint drawBuf[1];
        glGetIntegerv(GL_DRAW_BUFFER, drawBuf);
        GLint readBuf[1];
        glGetIntegerv(GL_READ_BUFFER, readBuf);

        glReadBuffer(GL_FRONT);

        // HERE THERE SHOULD BE THE CODE THAT COPIES A PART OF THE FRONT BUFFER INTO THE BACK BUFFER

        glReadBuffer(readBuf[0]);
        glFinish();

As you can see, the code is very trivial. I simply change the read buffer to GL_FRONT, and soon change it back to the previous value (which
was GL_BACK, as I could verify).
But, once this code is executed, then on next refresh in graphics the screen starts flickering.
Basically, the call that causes the issue is that in yellow (if I comment it out, the issue disappears).
Any idea why? Is it a bug in Mesa?
Above code works fine on Win, as I said.

Thanks,
Gianluca Natale

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20180924/591cda2b/attachment.html>


More information about the mesa-users mailing list