xserver/hw
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michel Dänzer c7905c5ca7 dri2: Deduplicate attachments in do_get_buffer
It was always the intention of the DRI2 protocol that there's at most
one instance of each attachment, and that's how it was implemented in
Mesa.

Since that wasn't enforced though, there might be other clients in the
wild which (e.g. accidentally) request the same attachment multiple
times. So starting to a raise a protocol error in this case now risks
breaking such clients.

Instead, just deduplicate the attachments using a bit-set.

This has a couple of desirable side effects:

* destroy_buffer cannot be called multiple times for the same
  DRI2BufferPtr.
* The client cannot cause the server to allocate a buffers array with
  more entries than there are attachments (currently 11).

Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2228>
2026-06-10 15:55:12 +02:00
..
kdrive kdrive: ephyr: add noreturn attribute to ephyrProcessErrorEvent() 2025-12-11 15:05:01 +01:00
vfb vfb: use snprintf when writing XWD window name 2026-04-21 12:17:22 +02:00
xfree86 dri2: Deduplicate attachments in do_get_buffer 2026-06-10 15:55:12 +02:00
xnest mingw32: fix winsock2.h include 2025-12-19 12:37:12 +01:00
xquartz xquartz: drop using HAVE_DIX_CONFIG_H 2025-07-08 17:43:07 +02:00
xwin hw/xwin: More adjustments to multiwindow mode focus handling 2026-04-27 15:22:59 +02:00
meson.build drop Xwayland 2025-06-17 12:51:36 +02:00