16 comments

[ 5.1 ms ] story [ 34.7 ms ] thread
I'm trying to figure out what this means for me, a user of KWin, but it all seems a bit nebulous. Better for multiple-GPU and Nvidia setups.. okay I don't have that; I think most people don't. Better for "finishing with compositing before vblank"; is this a problem now? Kwin never tears for me, even on my anemic hardware. Better for sRGB and YUV textures; what does this mean for users?

And then there's this part:

> whenever we use modern features in OpenGL, we have to put in conditionals that preserve compatibility all the way down to OpenGL ES 2. In theory that complicates the code, and in practice we just end up not using these features at all. With a Vulkan renderer we can have hard requirements for such modern features, which can make the renderer more efficient

How does that square with this part?

> We have OpenGL as a fallback, so compatibility can effectively be ignored

If OpenGL is maintained as a fallback, then how does adding Vulkan and keeping OpenGL simplify the code?

Anyway, I hope it all goes well.

> If OpenGL is maintained as a fallback, then how does adding Vulkan and keeping OpenGL simplify the code?

I think the idea here is that Vulkan will be the "modern" renderer and OpenGL will become the "legacy" renderer. Then, there's no need to worry about conditionally "up-featuring" the OpenGL renderer anymore. They're two separate backends, which is arguably cleaner than a million conditionals in the OpenGL code.

I think the biggest argument, reading as a complete outsider, is really this one:

* driver behavior is much more predictable and well specified.

OpenGL drivers, overall, are _screwed up_ and ridiculously unpredictable. And it's only getting worse now that Vulkan is around, since there's even less incentive than ever for GPU vendors to make functioning OpenGL drivers. Supporting Vulkan now would both save out on driver compatibility issues and get out ahead of the OpenGL driver atrophy.

> OpenGL drivers, overall, are _screwed up_ and ridiculously unpredictable.

Can you expand on what it means for the OpenGL drivers to be unpredictable? Are you referring to things like this?

> "sRGB textures, which do hardware accelerated and automatic conversions between sRGB and linear encoding. With OpenGL, the behavior with alpha is implementation defined"

To be honest I'm not sure what that means. Does it mean that on different hardware, colors created from the blending of two or more textures will be slightly different because they're using different blending algorithms? Is this a trivial matter of outputs looking slightly different on different hardware that blends colors in slightly different ways, or are there more serious consequences to this sort of thing?

It's also a forward-looking move, if everything moves to Vulkan than open-source driver efforts can focus on Vulkan instead of trying to do both Vulkan and OpenGL.

> If OpenGL is maintained as a fallback, then how does adding Vulkan and keeping OpenGL simplify the code?

Well it doesn't right now, but can in the future because it opens the door to dropping OpenGL entirely.

> Well it doesn't right now, but can in the future because it opens the door to dropping OpenGL entirely.

That's my concern, because it contradicts "We have OpenGL as a fallback, so compatibility can effectively be ignored"

There already exists an opengl-to-vulcan shim driver (zink) that is better than most opengl platform drivers.
Their looking for a vulkan-to-opengl shim for when opengl fallback is dropped
> Better for "finishing with compositing before vblank"; is this a problem now? Kwin never tears for me, even on my anemic hardware.

This lets it schedule the composition step closer to when it's shown on the display. It means that the contents of windows are more up-to-date, so less lag or latency.

> Better for sRGB and YUV textures; what does this mean for users?

Support for direct rendering of video, alternate color space support, like HDR.

Every single laptop with a dGPU will benefit from this. Not to mention zink being arguably better than native opengl drivers, simplification of maintenance, etc.
This is something I've been wondering about for a while, and I'm surprised I haven't even seen any toy projects use Vulkan over OpenGL for Wayland as it could fix a lot of sharp edges. It's good to see KDE pick this up, good luck!
How important is to have a decent GPU for smooth desktop experience currently and in near future? I was considering switching to less power hungry GPU, but I fear it might make DE slower.
GPUs have gotten to the state that anything not bottom of the barrel can do a composited desktop just fine. It's mostly ARM chips with anemic GPUs that can't do it. I'm looking at you, Raspberry Pi.
Important are drivers. Integrated intel or AMD GPUs are fine. Also KWin has CPU software rendering, that works mostly fine.
As a long-time full-time linux user, I've for the past weeks been trying to use wayland with KDE again, but simple things like a lack of a native screen locker for basic desktop security and ubiquitous software support by packages are far from a starter.

What mostly got me even wanting to use wayland over x11 was better emulation fps for playing the new Zelda, but most everything else is still pretty darn rough to stick with x11 for now.

What do you mean? Plasma Wayland has a lockscreen.
Theory: Screen lock was briefly broken few months ago. Maybe OP tested KDE during that time.