GTK4 fails to initialize OpenGL on old GL v3.3 hardware
GTK fails to initialize OpenGL context on old hardware with support of OpenGL core profile up to version 3.3. Neither GtkGLArea nor GSK GL backend works.
Steps to reproduce
- Run the latest
org.gtk.Demo4
on old OpenGL 3.3 GPU; - Run any GtkGLArea demo;
- Check active GSK Renderer in the Inspector.
Current behavior
The warning is shown in terminal:
Gsk-Message: 21:32:21.477: Failed to realize renderer of type 'GskGLRenderer' for surface 'GdkX11Toplevel': Unable to create a GL context
GtkGLArea Gears shows an error "Unable to create a GL context". GSK uses Cairo as renderer.
Expected outcome
No warnings in terminal. GtkGLArea Gears should show the moving gears. GSK should use GL renderer. All should work fine as in org.gtk.Demo4 from 2023-04-26.
Version information
- The latest
org.gtk.Demo4
from the gnome-nightly flatpak repository commit 29c39869dfbf07d96f4ccbb3703bcf7b42940e1ae7253a7d284034a62c1058aa from 2023-05-30 05:24:55 +0000 - This issue first appears in the commit 1a96ce060dbd9a2424917db714f9afc34c35709b20a372c08af79b0d00b9be91 from 2023-04-27 01:01:56 +0000
- The previous commit works fine a0fcd88ca25a3259dc7bb9c51269848a83d80cffd2f287af3036f151f48cbcfc from 2023-04-26 22:33:31 +0000
- Up to date 64bit Debian Bookworm
Additional information
I have spoted some changes in GL context initialization in git commits just before 2023-04-27. On modern hardware all works as expected.
- System:
- Host: scavenger Kernel: 5.10.0-22-amd64 arch: x86_64 bits: 64 Desktop: Xfce v: 4.18.1 Distro: Debian GNU/Linux 12 (bookworm)
- CPU:
- Info: dual core model: Pentium T4500 bits: 64 type: MCP cache: L2: 1024 KiB
- Speed (MHz): avg: 2228 min/max: 1200/2300 cores: 1: 2215 2: 2242
- Graphics:
- Device-1: AMD RV710/M92 [Mobility Radeon HD 4530/4570/5145/530v/540v/545v] driver: radeon v: kernel
- Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: radeon unloaded: fbdev,modesetting,vesa dri: r600 gpu: radeon resolution: 1366x768~60Hz
- API: OpenGL v: 3.3 Mesa 22.3.6 renderer: AMD RV710 (DRM 2.50.0 / 5.10.0-22-amd64 LLVM 15.0.6)
`--> glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
Max core profile version: 3.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.3.6
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 22.3.6
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 22.3.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00