egl/x11_dri3: implement EGL_KHR_swap_buffers_with_damage
Passes all of `dEQP-EGL.functional.swap_buffers_with_damage.*`:
Passed: 36/54 (66.7%)
Failed: 0/54 (0.0%)
Not supported: 18/54 (33.3%)
Warnings: 0/54 (0.0%)
Waived: 0/54 (0.0%)
The "not supported" ones are the `preserve_buffer_*` tests, which is not
supported on X11/DRI3.
Cc: 20.2 <mesa-stable>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3030
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6132>