Originally posted by slacka
View Post
There are -or there could be- better 2D APIs than XRender, which, moreover, were not tied to a particular display system (for example, OpenVG). They could be implemented as Gallium state trackers, which would mean using 3D resources (but much more efficiently than GLAMOR; it would be comparable to using Wine with the Nine state tracker vs Wine's Direct3D-to-OpenGL translation layer), or directly over the hardware, as those traditional -and difficult to maintain- DDXs. I believe, however, that GPUs haven't included a 2D engine for some time, so most of the optimizations come from knowing whether it would be worth to upload things to the GPU or it would just be better to do them in the CPU.
GLAMOR, being a generic implementation of XRender, avoids the effort of maintaining two graphic implementations. I don't know if it could ever be as fast as SNA, but I doubt it. However, its main targets are not already-supported GPUs, but those which aren't (AMD's GCN,...) and for which writing dedicated implementations would be time consuming, and XWayland - which, for some reason I don't remember, doesn't support using the hardware directly. So GLAMOR isn't the "future of 2D acceleration", but rather the "last life preserver" for those X-only applications: the less time that's spent with that condemned thing that is X, the better, because it's time spent with a non-monolithic, more future-proof stack. (X will still be used for some years in some places, but in those places there won't be any new GPU, so not implementing XRender over bare-hardware for those chips is not a problem). Under Wayland, I guess Cairo or perhaps OpenVG would be used for 2D -and Cairo leverages OpenGL or OpenVG, see the list of its backends-, so such duplication isn't needed - all graphics implementations would be in Mesa, which is where they belong.
Performance should be better with Wayland. And, as said, 2D APIs not tied to a particular display system could still be implemented directly over the hardware, which could mean delivering even more performance.
Comment