Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic: switch to OpenGL #9781

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Generic: switch to OpenGL #9781

wants to merge 1 commit into from

Conversation

smp79
Copy link
Contributor

@smp79 smp79 commented Feb 11, 2025

OpenGL has several advantages over current OpenGL ES Generic images:

  1. HQ upscaler improvements
  2. Dithering support
  3. Future Retroplayer OpenGL shader support
  4. Colour management support

HDR passthrough would be functional after xbmc/xbmc#26406 is merged.

@antonlacon
Copy link
Contributor

LE13 is Soon(TM), so I believe this needs to be a new device unless the intent is to wait for LE14. If others feel differently, this isn't a strong objection.

Would you see if replacing your Kodi package.mk commit with antonlacon@92f136f works for you? It's a clean up to get x11/wayland/gbm options set in the same part of package.mk. I've been using it for RPi5 builds.

@smp79
Copy link
Contributor Author

smp79 commented Feb 12, 2025

Would you see if replacing your Kodi package.mk commit with antonlacon@92f136f works for you?

👍

LE13 is Soon(TM), so I believe this needs to be a new device unless the intent is to wait for LE14.

It could wait until LE14 I suppose. Not sure if adding it as a new device would be useful to anybody.

@CvH
Copy link
Member

CvH commented Feb 12, 2025

Not sure if adding it as a new device would be useful to anybody.

If I understand it right it supersedes gles and just adds features and not removes anything.
So it should replace it in my opinion.

It could wait until LE14 I suppose.

The main problem with that kind of changes are that problems can lurk around dark corners. So a rather big testing phase would not hurt, on the other hand its not new technology and it is widely used so likewise (famous last words) not too much trouble should appear.

@HiassofT
Copy link
Member

Just for the kicks I gave this a quick try on RPi (and switched RPi to opengl as well).

First the positive stuff: kodi came up fine on RPi5.

But: as RPi5 only supports OpenGL 3.1 and 1.4 shaders kodi wasn't overly happy as it wants 3.2 (plus a lot of it's shaders are 1.5).

Here's the kodi log from RPi5: https://paste.libreelec.tv/composed-ox.log

Also the quite important direct-to-plane rendering is missing with the GL renderer and videos were software decoded (which is not great for 4k60)

Next test on RPi3: Although kodi GUI came up it was quite unhappy with it's OpenGL 2.1 version (and shaders are also only level 1.2) and the GUI was quite broken - practically unusable due to lots of missing stuff, eg highlighting the currently selected element:
screenshot00000

here:s the log from RPi3: https://paste.libreelec.tv/premium-condor.log

@smp79
Copy link
Contributor Author

smp79 commented Feb 13, 2025

Tried it on a rather old AMD Oland GPU - it runs nicely

IMG_20250213_232057330

@antonlacon
Copy link
Contributor

But: as RPi5 only supports OpenGL 3.1 and 1.4 shaders kodi wasn't overly happy as it wants 3.2 (plus a lot of it's shaders are 1.5).

I tried zink on RPI5 to see if it would be better. It's not. Kodi failed to launch (unable to init gbm). Additionally, zink was only providing OpenGL 2.1 and GLSL 1.2:

LibreELEC:~ # MESA_LOADER_DRIVER_OVERRIDE="zink" ./eglinfo  | grep OpenGL
EGL client APIs: OpenGL
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: zink Vulkan 1.3(V3D 7.1.7.0 (MESA_V3DV))
OpenGL compatibility profile version: 2.1 Mesa 24.3.4
OpenGL compatibility profile shading language version: 1.20
OpenGL compatibility profile extensions:

Kodi log: https://paste.libreelec.tv/smashing-emu.log

@smp79
Copy link
Contributor Author

smp79 commented Feb 15, 2025

Can anyone test if this is usable on nvidia? Extra changes to build it with nvidia driver - smp79@cfb5dbe
Looks like it would require some serious hackery to run Kodi on nvidia GBM.

@KOPRajs
Copy link
Contributor

KOPRajs commented Feb 16, 2025

I don't have Nvidia, but I'm going to test this in long-term on my family HTPC along with the upcoming video shader support. I've backported it to my build based on stable LE 12.0.2 and Kodi 21.2 (including the HDR support).

The build is here, if anyone wants to try it:
https://github.com/KOPRajs/LibreELEC.tv/tree/retroplayer-21.2
http://koprajs.mx-net.cz/retroplayer-21.2/LibreELEC-Generic.x86_64-12.0-devel-20250212160024-0fd26c2.tar
http://koprajs.mx-net.cz/retroplayer-21.2/game.libretro-22.1.1.1.zip
http://koprajs.mx-net.cz/retroplayer-21.2/game.shader.presets-22.0.0.1.zip

It is Generic LE 12.0.2 running GBM/GL with the HDR patch + RetroPlayer devel stuff. You need to manually install the 2 above add-ons from zip to get games running with shaders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants