return extensions;
}
-static GLboolean
-__driGetMSCRate(__DRIdrawable *draw,
- int32_t * numerator, int32_t * denominator,
- void *loaderPrivate)
-{
- __GLXDRIdrawable *glxDraw = loaderPrivate;
-
- return __glxGetMscRate(glxDraw->psc, numerator, denominator);
-}
-
-_X_HIDDEN const __DRIsystemTimeExtension systemTimeExtension = {
- .base = {__DRI_SYSTEM_TIME, 1 },
-
- .getUST = __glXGetUST,
- .getMSCRate = __driGetMSCRate
-};
-
#define __ATTRIB(attrib, field) \
{ attrib, offsetof(struct glx_config, field) }
extern void
driReleaseDrawables(struct glx_context *gc);
-extern const __DRIsystemTimeExtension systemTimeExtension;
-
extern void dri_message(int level, const char *f, ...) PRINTFLIKE(2, 3);
#define InfoMessageF(...) dri_message(_LOADER_INFO, __VA_ARGS__)
#include "dri2.h"
#include "dri_sarea.h"
#include <dlfcn.h>
+#include <sys/time.h>
#include <sys/types.h>
#include <sys/mman.h>
#include "xf86drm.h"
return e ? e->config : NULL;
}
+/**
+ * Get the unadjusted system time (UST). Currently, the UST is measured in
+ * microseconds since Epoc. The actual resolution of the UST may vary from
+ * system to system, and the units may vary from release to release.
+ * Drivers should not call this function directly. They should instead use
+ * \c glXGetProcAddress to obtain a pointer to the function.
+ *
+ * \param ust Location to store the 64-bit UST
+ * \returns Zero on success or a negative errno value on failure.
+ *
+ * \sa glXGetProcAddress, PFNGLXGETUSTPROC
+ *
+ * \since Internal API version 20030317.
+ */
+static int
+__glXGetUST(int64_t * ust)
+{
+ struct timeval tv;
+
+ if (ust == NULL) {
+ return -EFAULT;
+ }
+
+ if (gettimeofday(&tv, NULL) == 0) {
+ ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec;
+ return 0;
+ }
+ else {
+ return -errno;
+ }
+}
+
+static GLboolean
+__driGetMSCRate(__DRIdrawable *draw,
+ int32_t * numerator, int32_t * denominator,
+ void *loaderPrivate)
+{
+ __GLXDRIdrawable *glxDraw = loaderPrivate;
+
+ return __glxGetMscRate(glxDraw->psc, numerator, denominator);
+}
+
+static const __DRIsystemTimeExtension systemTimeExtension = {
+ .base = {__DRI_SYSTEM_TIME, 1 },
+
+ .getUST = __glXGetUST,
+ .getMSCRate = __driGetMSCRate
+};
+
static GLboolean
has_damage_post(Display * dpy)
{
extern const char __glXGLClientVersion[];
extern const char __glXGLClientExtensions[];
-/* Get the unadjusted system time */
-extern int __glXGetUST(int64_t * ust);
-
extern GLboolean __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
int32_t * numerator,
int32_t * denominator);
#include "apple/apple_glx.h"
#include "util/debug.h"
#else
-#include <sys/time.h>
#ifndef GLX_USE_WINDOWSGL
#include <X11/extensions/xf86vmode.h>
#endif /* GLX_USE_WINDOWSGL */
(procName), glXGetProcAddressARB)
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
-/**
- * Get the unadjusted system time (UST). Currently, the UST is measured in
- * microseconds since Epoc. The actual resolution of the UST may vary from
- * system to system, and the units may vary from release to release.
- * Drivers should not call this function directly. They should instead use
- * \c glXGetProcAddress to obtain a pointer to the function.
- *
- * \param ust Location to store the 64-bit UST
- * \returns Zero on success or a negative errno value on failure.
- *
- * \sa glXGetProcAddress, PFNGLXGETUSTPROC
- *
- * \since Internal API version 20030317.
- */
-_X_HIDDEN int
-__glXGetUST(int64_t * ust)
-{
- struct timeval tv;
-
- if (ust == NULL) {
- return -EFAULT;
- }
-
- if (gettimeofday(&tv, NULL) == 0) {
- ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec;
- return 0;
- }
- else {
- return -errno;
- }
-}
-#endif /* GLX_DIRECT_RENDERING */
-
-#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
PUBLIC int
MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,