Closed ngocnha closed 10 months ago
I suspect that somehow the window is not created to be suitable for GLX rendering :(
Under what condition is this triggered?
We should be able to give a better error message at least when this happen.
Maybe the issue occurred while I was using the NVIDIA graphics mode. When I switched to Hybrid mode today, it started working again.
Hardware Model: Micro-Star International Co., Ltd. GF63 Thin 8RCS Memory: 16.0 GiB Processor: Intel® Core™ i7-8750H CPU @ 2.20GHz × 12 Graphics: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] / Mesa Intel® UHD Graphic
OS Name: Pop!_OS 22.04 LTS OS Type: 64-bit GNOME Version: 42.5 Windowing System: X11
NVDIA Driver: 525.85.05
Getting the same error using the same same driver version on a RTX 3070, may be related to NVIDIA X11 implementation.
I can reproduce this error locally (yay)
I think this is somewhat related to https://github.com/rust-windowing/winit/issues/2681 . Until winit can tell us what visual it picked, we need have two code paths:
with_x11_visual
- that way the visuals match and this error should go away.I made a fix for this that works with FemtoVG. With Skia the situation is a little more complicated, because the internal Skia renderer API is built on two assumptions:
So the "easy" fix, adding WindowBuilder
to the API and using glutin-winit
doesn't quite work.
I tried to fix this by creating the corresponding glutin config that can provide the x11 visual in the skia renderer constructor (only on x11), then pass the visual to the window builder, and then continue as normal. Unfortunately this crashes in the Skia GL code. Branch is at https://github.com/slint-ui/slint/tree/simon/wip/skia-glx
We should not panic anymore since https://github.com/slint-ui/slint/pull/2907
(edited by @tronical )
Running with the FemtoVG or Skia OpenGL renderers against a GLX accelerated display panics.
The backtrace below is from an earlier symptom.
Acceptance criteria: