[Mesa-users] another serious issue with OpenGL on Linux
Brian Paul
brianp at vmware.com
Mon Sep 24 15:47:56 UTC 2018
On 09/24/2018 07:26 AM, Gianluca Natale wrote:
> 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.
I hacked that code into the Mesa gears demo and tested with llvmpipe but
didn't see any issue.
Could you possibly supply a complete test program which shows the
problem? Modifying a Mesa/GLUT demo would probably be easiest.
-Brian
>
> 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
>
>
>
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.freedesktop.org
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-users&data=02%7C01%7Cbrianp%40vmware.com%7C6dc6fddf61cb42c929c708d622214cdf%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636733923760130662&sdata=Cmghd3A0NO5jNlimyhPclWq%2Fs5jY12S5uP4AUJUxPqw%3D&reserved=0
>
More information about the mesa-users
mailing list