@lina @dougall Another task was getting X11 applications working. On Lina's latest stream, she could try to open X11 applications like xterm and urxvt, but they were unusably glitchy! After getting SuperTuxKart running, I turned to debugging why.
It turns out the culprit was glPointSize(). In OpenGL ES, any time an application renders points, it has to write out the point size as a special variable in the vertex shader. But in OpenGL, the application can omit the write and instead set the point size on the CPU with a glPointSize() call.
Currently, the Asahi Mesa driver handles gl_PointSize variable writes but not glPointSize calls. But that doesn't mean all points will have a "default" size... they'll have undefined sizes! The hardware will read out a variable that's never written, and havoc ensues.
Fortunately, this issue is easy to workaround. All we need to do is add a gl_PointSize write into the vertex shader whenever we see a glPointSize call. Mesa even has common code to do this, we just need to opt-in to using it like Zink does (since layering OpenGL-on-Vulkan has the same problem). So with a single line of code inserted, X11 applications work. Not just xterm and urxvt -- entire desktop environments like MATE seem to render ok, although there's lots of low-hanging performance work to go.
All in all, a good day for Apple GPUs!
@lina @dougall While working on these userspace Mesa changes today, I did not hit a single GPU kernel driver bug. Not. A. Single. Bug.
This is thanks to Lina's phenomenal efforts. She took a gamble writing the kernel driver in Rust, knowing it would take longer to get to the first triangle but believing it would make for a more robust driver in the end. She was right.
A few months of Lina's Rust development has produced a more stable driver than years of development in C on certain mainline Linux GPU kernel drivers.
I think... I think I have Rust envy π¦β
....Or maybe just Lina envy πβ
@lina @dougall While working on these userspace Mesa changes today, I did not hit a single GPU kernel driver bug. Not. A. Single. Bug.
This is thanks to Lina's phenomenal efforts. She took a gamble writing the kernel driver in Rust, knowing it would take longer to get to the first triangle but believing it would make for a more robust driver in the end. She was right.