Add support for optimized versions of the code underlying ReadPixels
[mesa.git] / src / mesa / drivers / dri / common / dri_util.c
index 6b2fcdfa7db53f79aa0729b36237a4535dba254e..dd83080cca0447250c7be37fe98655dc82aee767 100644 (file)
 #include "drm_sarea.h"
 #include "glcontextmodes.h"
 
-#ifndef GLX_OML_sync_control
+#ifndef PFNGLXGETMSCRATEOMLPROC
 typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __DRIid drawable, int32_t *numerator, int32_t *denominator);
 #endif
 
+/**
+ * Weak thread-safety dispatch pointer.  Older versions of libGL will not have
+ * this symbol, so a "weak" version is included here so that the driver will
+ * dynamically link properly.  The value is set to \c NULL.  This forces the
+ * driver to fall back to the old dispatch interface.
+ */
+struct _glapi_table *_glapi_DispatchTSD __attribute__((weak)) = NULL;
+
 /**
  * This is used in a couple of places that call \c driCreateNewDrawable.
  */