eglQueryWaylandBufferWL(..., EGL_TEXTURE_FORMAT, ...) is assumed to fail for EGLStream-backed buffers
If Mutter succeeds in querying EGL_TEXTURE_FORMAT for a Wayland buffer, it assumes it is an EGLImage-backed buffer and treats it accordingly. Currently this is a safe assumption as support for querying that attribute is not implemented in the NVIDIA EGL Wayland driver, and thus will fail for EGLStream-backed buffers. However, NVIDIA is planning on adding this support which will cause problems with Mutter's current behavior, since this query will start succeeding for EGLStream-backed even though they need to be handled differently than EGLImage buffers.
One possible resolution would be to check for an EGLStream buffer first, and then only if that fails fall back to the other cases.