Bug 91534 - r300 blocking GLX and EGL compositing in KWin (KDE Plasma 5.x)?
Summary: r300 blocking GLX and EGL compositing in KWin (KDE Plasma 5.x)?
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: 10.5
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-02 23:14 UTC by Aaron Pickett
Modified: 2015-08-31 23:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Attempt to force EGL-based OpenGL compositing (9.56 KB, text/plain)
2015-08-02 23:14 UTC, Aaron Pickett
Details

Description Aaron Pickett 2015-08-02 23:14:50 UTC
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_OPENGL_INTERFACE=egl
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.
Comment 1 Emil Velikov 2015-08-03 11:24:21 UTC
Hi Aaron,

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.
Comment 2 Marek Olšák 2015-08-06 13:19:21 UTC
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.
Comment 3 Marek Olšák 2015-08-06 13:24:04 UTC
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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.