dri/common: move the required GLX_* token definitions locally
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 5 Sep 2018 16:35:13 +0000 (17:35 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 3 Oct 2018 12:38:06 +0000 (13:38 +0100)
Will allow us to remove even bigger hack elsewhere. But more
importantly, we should not be using _any_ GLX tokens in DRI.

Document the gory details about the current side-effects.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/drivers/dri/common/utils.c

index 9a518153dc802c0a4a8ec9599056332c75f3be33..5a66bcf8e054bee9ead54e43e6a382c8c253b73e 100644 (file)
 #include "utils.h"
 #include "dri_util.h"
 
+/* WARNING: HACK: Local defines to avoid pulling glx.h.
+ *
+ * Any parts of this file that use the following defines are either partial or
+ * entirely broken wrt EGL.
+ *
+ * For example any getConfigAttrib() or indexConfigAttrib() query from EGL for
+ * SLOW or NON_CONFORMANT_CONFIG will not work as expected since the EGL tokens
+ * are different from the GLX ones.
+ */
+#define GLX_NONE                                                0x8000
+#define GLX_SLOW_CONFIG                                         0x8001
+#define GLX_NON_CONFORMANT_CONFIG                               0x800D
+#define GLX_DONT_CARE                                           0xFFFFFFFF
+
 /**
  * Create the \c GL_RENDERER string for DRI drivers.
  *