EGL_EXT_swap_tearing_hint Has Landed

Posted November 17 2026

1121 words, ~6.2 min read at 180 words per minute


We all know about Wayland and the story of tearing-control-v1, right? Well, if you don't, Wayland doesn't allow screen tearing. tearing-control-v1 even says "The default presentation hint is vsync," and it's a pretty big thing that Wayland, no matter what, does not tear, unless a client has explicitly said "yeah, go for it."

If you needed any more convincing, EGL even documents this for the Wayland platform:

Specifying an eglSwapInterval of 0 shall result in unpaced buffer swaps which will be presented to the display without tearing or other mid-frame-update artifacts. Tearing will not happen without additional hinting; it may be requested with further extensions via EGL.

(this was my doing to document it as such, but not without acknowledgement from multiple people, and at least one entire decade of precedent!)

And for the reasoning why:

Does eglSwapInterval of 0 allow tearing?

RESOLVED. No. Historical precedent is for swap intervals of 0 to never tear, and Wayland hasn't had screen tearing for over 10 years until the addition of wp_tearing_control. Additionally, applications rely on swap intervals of 0 to not tear. Swap intervals of 0 do not tear under Wayland, and clients should request tearing through other EGL extensions.

Aw, that's a bummer :( Now how else are we supposed to request tearing on our EGL-provided Wayland surface, especially if we aren't supposed to use tearing-control-v1 ourselves (see below)?

Graphics APIs like EGL or Vulkan, that manage the buffer queue and commits of a wl_surface themselves, are likely to be using this extension internally. If a client is using such an API for a wl_surface, it should not directly use this extension on that surface, to avoid raising a tearing_control_exists protocol error.

Cue EGL_EXT_swap_tearing_hint.

Merged in EGL-Registry #228.

With an attempted Mesa implementation for Wayland and Zink in Mesa !44749.

And the beginning of something for NVIDIA's EGL Wayland platform in egl-wayland2 !61, although I most definitely won't be able to finish the work due to several environmental factors. Kyle Brenneman has offered to do the work if nobody else gets to it first, and it will quite possibly turn out this way.

Vulkan has kinda sorta supported this specific flavor of control for a long while now, with VkPresentModeKHR. It's actually something I had to do some interfacing with, when attempting to implement this in Zink, although it didn't map 1:1 since EGL needs to pull from multiple places to patch together the same information. That was loads of fun. I also had a DEFAULT case to handle, which, in practice, turned out like this:

Please do remember that this is all just a hint; the EGL platform is free to do whatever it likes, and your hints might not even be considered if some other policy says to not bother with it. Reading the extension documentation may be helpful.

But, in the end, I did at least attempt the implementation, although it could do with a separate PR to expose it for the X11 EGL platform in Mesa. I mostly focused on Wayland, since I rarely, if ever, use X11 (even through XWayland).

So how do I, as a regular user, make use of this extension?

Well, you don't. Your applications do though. And how do your applications make use of it?

Well, they don't. Usually. They let SDL or their game engine of choice handle it. But if they were to handle it themselves, it would look a little something like this:

Of course, please do read the extension's (or your library's) fine print, as this is all just runtime hints, and you should never depend on this to mean that your surface will always tear. Because it won't. If it does, then I'll start tearing up. And none of us want that, right? Right???

That's all, folks. For now.

Anyway. So this is a thing now, and hopefully it'll be available to most people by, ehhh... middle of next year? That's what I'd like to shoot for, although it depends on people more experienced in EGL and Mesa than I reviewing my pull request. And it also depends on my own free time, which can vary, given I'm currently unemployed, doing my best to work on some college classes because I'm unemployed, and then trying to finish those classes before I'm forced to figure out some other way to keep my rent paid every month.

How you can support me

If you do like what I do (which, I will say, mostly centers on Flatpak and Flathub work), please consider supporting me financially. I have some different platforms set up in my Support page you can use to do so, or email me directly (at contact@yvesauxier.com) if you don't see anything you like, can use, or need to contact me for any other reason.

I'm a build moderator and submission reviewer for Flathub, and currently trying to land the button-placement Settings portal implementation for GNOME and GTK, along with some additions to the Inhibit portal for locked and suspending states. Oh, and I started work on an upgraded ProxyResolver portal, so that web browsers and applications can make better use of the system proxy settings, although this is considerably more involved and I need to properly dedicate time to it.