Created attachment 117488 [details]
Attempt to force EGL-based OpenGL compositing
I have an old laptop with ATI RS480 graphics (Radeon Xpress 200M), and I've been testing KDE Plasma 5.x in KUbuntu 15.04 (currently version 5.3 from the backports PPA). In all the versions I've tried, OpenGL compositing fails. For the GLX API, I assume this is because r300 *almost* supports OpenGL 2.1, but falls short on NPOT texture support.
After some reading (http://blog.martin-graesslin.com/blog/2011/07/running-kwin-with-opengl-es-2-0/), I thought I might try the EGL API for OpenGL ES compositing. The GUI wouldn't let me select EGL, so I forced it using environment variables (https://community.kde.org/KWin/Environment_Variables) as follows:
KWIN_COMPOSE=O1 (I also tried O2, same result)
Unfortunately, the (truncated) result is:
kwin_core: OpenGL driver recommends XRender based compositing. Falling back to XRender.
kwin_core: Failed to initialize compositing, compositing disabled
From what I've read, the r300 should have full OpenGL ES 2.0 support, so is the driver blocking EGL compositing unnecessarily?
The full log of my attempt to force EGL-based compositing is attached.
We do have some fixes in mesa 10.6.x that never made it into 10.5 series. I would give mesa 10.6.x a spin first.
I'm not a r300 dev myself so I cannot comment on the driver, although it doesn't show any signs of issues. Here are some bits you might find interesting:
- Seemingly the driver already exposes NPOT + OpenGL 2.1 (albeit some hardware limitations, which should be handled by the driver).
- GLX does not always mean you'll get OpenGL, similar to EGL and OpenGLES. One can mix and match depending on various factors.
In your case EGL + OpenGL is attempted but I'm not sure how to force gles. Older versions had kwin_gles, which seems to be gone with the 5 series. Might want to look into a way of forcing gles, and getting more verbose output on kwin side.
Hi, r300 doesn't support NPOT textures fully. The only thing it supports is 2D NPOT textures without mipmapping. That's pretty limited, but it was what D3D9 originally required. In other words, the driver shouldn't report that it supports NPOT textures, but then we would lose GL2 support, which would be a lot bigger problem.
There is no fix other than complete software emulation, which nobody wants.
I suggest you talk to the KDE guys whether there is a solution. You can point them to my replies.
The thing is there has never been a GL2 GPU on the market, so the GL2 specification was kind of a fail. There were GL1.5 GPUs (r500) and then GL3 GPUs (r600), yet the market demanded GL2 drivers.