From 60a31156b09e7ed16d0f4434cdc3dd93cb1488a6 Mon Sep 17 00:00:00 2001 From: Patrick Lerda Date: Wed, 16 Apr 2025 20:02:09 +0200 Subject: [PATCH] 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 3b603d16466. 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: 3b603d16466 ("mesa_interface: remove unused stuff") Signed-off-by: Patrick Lerda Acked-by: Mike Blumenkrantz Part-of: --- src/gallium/include/mesa_interface.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/gallium/include/mesa_interface.h b/src/gallium/include/mesa_interface.h index 36317511b2f..c3195e40eb5 100644 --- a/src/gallium/include/mesa_interface.h +++ b/src/gallium/include/mesa_interface.h @@ -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 {