xserver/Xext/dri2
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michel Dänzer 6928daf585 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).

changes by mtx: fix FTBS by dropping now unused have_fake_front variable.

Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2228>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-06-10 15:52:17 +02:00
..
pci_ids Xext: dri2: pci_ids: fix includes (silence clang-tidy) 2026-04-24 18:15:46 +02:00
dri2.c dri2: Deduplicate attachments in do_get_buffer 2026-06-10 15:52:17 +02:00
dri2_priv.h
dri2ext.c Xext/dri2: Add a comment 2026-04-13 18:14:33 +02:00
dri2int.h Xext: dri2: dri2int.h: fix missing include 2026-04-22 20:13:29 +02:00
meson.build Xext: dri2: move over public SDK header to include/ 2026-02-12 15:36:07 +01:00