mesa_interface: fix legacy dri2 compatibility

These values are shared with xcb/dri2.h, and can't be changed
without breaking the legacy dri2 compatibility. This change
reverses partially the update done by 3b603d1646.

For instance this issue is triggered on dri2 i915 with
"piglit/bin/glx-copy-sub-buffer -auto" or
"piglit/bin/hiz-depth-read-window-stencil0 -auto".

Fixes: 3b603d1646 ("mesa_interface: remove unused stuff")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34561>
This commit is contained in:
Patrick Lerda 2025-04-16 20:02:09 +02:00 committed by Marge Bot
parent de6efc01c1
commit 60a31156b0

View file

@ -565,6 +565,9 @@ typedef unsigned int
/**
* DRI2 Loader extension.
*
* These definitions are shared with xcb/dri2.h.
* Changing these definitions would break DRI2.
*/
#define __DRI_BUFFER_FRONT_LEFT 0
#define __DRI_BUFFER_BACK_LEFT 1
@ -572,12 +575,14 @@ typedef unsigned int
#define __DRI_BUFFER_BACK_RIGHT 3
#define __DRI_BUFFER_DEPTH 4
#define __DRI_BUFFER_STENCIL 5
#define __DRI_BUFFER_FAKE_FRONT_LEFT 6
#define __DRI_BUFFER_FAKE_FRONT_RIGHT 7
#define __DRI_BUFFER_DEPTH_STENCIL 8 /**< Only available with DRI2 1.1 */
#define __DRI_BUFFER_ACCUM 6
#define __DRI_BUFFER_FAKE_FRONT_LEFT 7
#define __DRI_BUFFER_FAKE_FRONT_RIGHT 8
#define __DRI_BUFFER_DEPTH_STENCIL 9 /**< Only available with DRI2 1.1 */
#define __DRI_BUFFER_HIZ 10
/* Inofficial and for internal use. Increase when adding a new buffer token. */
#define __DRI_BUFFER_COUNT 9
#define __DRI_BUFFER_COUNT 11
/* Used by the X server. */
typedef struct {