From bec3df1e7fc31e46864dd913bbc25e2f44341913 Mon Sep 17 00:00:00 2001
From: Jeff Smith <whydoubt@yahoo.com>
Date: Wed, 10 Mar 2010 15:32:23 -0600
Subject: [PATCH] Change some int64_t's to uint64_t's, to match CARD64's signedness

Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
---
 include/GL/internal/dri_interface.h                |    8 +++---
 src/glx/dri2_glx.c                                 |   20 +++++++-------
 src/glx/dri_glx.c                                  |    6 ++--
 src/glx/drisw_glx.c                                |    6 +++-
 src/glx/glxclient.h                                |   18 +++++++-------
 src/glx/glxcmds.c                                  |   22 ++++++++--------
 src/mesa/drivers/dri/common/dri_util.c             |   14 +++++-----
 src/mesa/drivers/dri/common/dri_util.h             |   26 ++++++++++----------
 src/mesa/drivers/dri/common/vblank.c               |   20 +++++++-------
 src/mesa/drivers/dri/common/vblank.h               |    6 ++--
 src/mesa/drivers/dri/mga/mgacontext.h              |    4 +-
 src/mesa/drivers/dri/radeon/radeon_common.c        |    2 +-
 .../drivers/dri/radeon/radeon_common_context.h     |    4 +-
 src/mesa/drivers/dri/unichrome/via_context.h       |    4 +-
 14 files changed, 81 insertions(+), 79 deletions(-)

diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 1d4e82e..26b898c 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -201,15 +201,15 @@ struct __DRImediaStreamCounterExtensionRec {
      * to target_msc.
      */
     int (*waitForMSC)(__DRIdrawable *drawable,
-		      int64_t target_msc, int64_t divisor, int64_t remainder,
-		      int64_t * msc, int64_t * sbc);
+		      uint64_t target_msc, uint64_t divisor, uint64_t remainder,
+		      uint64_t * msc, uint64_t * sbc);
 
     /**
      * Get the number of vertical refreshes since some point in time before
      * this function was first called (i.e., system start up).
      */
     int (*getDrawableMSC)(__DRIscreen *screen, __DRIdrawable *drawable,
-			  int64_t *msc);
+			  uint64_t *msc);
 };
 
 
@@ -343,7 +343,7 @@ struct __DRIsystemTimeExtensionRec {
     /**
      * Get the 64-bit unadjusted system time (UST).
      */
-    int (*getUST)(int64_t * ust);
+    int (*getUST)(uint64_t * ust);
 
     /**
      * Get the media stream counter (MSC) rate.
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 5b0f335..63b1aee 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -204,22 +204,22 @@ dri2CreateDrawable(__GLXscreenConfigs * psc,
 
 static int
 dri2DrawableGetMSC(__GLXscreenConfigs *psc, __GLXDRIdrawable *pdraw,
-		   int64_t *ust, int64_t *msc, int64_t *sbc)
+		   uint64_t *ust, uint64_t *msc, uint64_t *sbc)
 {
    return DRI2GetMSC(psc->dpy, pdraw->xDrawable, ust, msc, sbc);
 }
 
 static int
-dri2WaitForMSC(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
-	       int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc)
+dri2WaitForMSC(__GLXDRIdrawable *pdraw, uint64_t target_msc, uint64_t divisor,
+	       uint64_t remainder, uint64_t *ust, uint64_t *msc, uint64_t *sbc)
 {
    return DRI2WaitMSC(pdraw->psc->dpy, pdraw->xDrawable, target_msc, divisor,
 		      remainder, ust, msc, sbc);
 }
 
 static int
-dri2WaitForSBC(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
-	       int64_t *msc, int64_t *sbc)
+dri2WaitForSBC(__GLXDRIdrawable *pdraw, uint64_t target_sbc, uint64_t *ust,
+	       uint64_t *msc, uint64_t *sbc)
 {
    return DRI2WaitSBC(pdraw->psc->dpy, pdraw->xDrawable, target_sbc, ust, msc,
 		      sbc);
@@ -367,15 +367,15 @@ process_buffers(__GLXDRIdrawablePrivate * pdraw, DRI2Buffer * buffers,
 
 }
 
-static int64_t
-dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
-		int64_t remainder)
+static uint64_t
+dri2SwapBuffers(__GLXDRIdrawable *pdraw, uint64_t target_msc, uint64_t divisor,
+		uint64_t remainder)
 {
     __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw;
     __GLXdisplayPrivate *dpyPriv = __glXInitialize(priv->base.psc->dpy);
     __GLXDRIdisplayPrivate *pdp =
 	(__GLXDRIdisplayPrivate *)dpyPriv->dri2Display;
-    int64_t ret;
+    uint64_t ret;
 
 #ifdef __DRI2_FLUSH
     if (pdraw->psc->f)
@@ -457,7 +457,7 @@ dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
    priv->swap_interval = interval;
 }
 
-static unsigned int
+static int
 dri2GetSwapInterval(__GLXDRIdrawable *pdraw)
 {
    __GLXDRIdrawablePrivate *priv =  (__GLXDRIdrawablePrivate *) pdraw;
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index e47db82..0fb7067 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -607,9 +607,9 @@ driCreateDrawable(__GLXscreenConfigs * psc,
    return pdraw;
 }
 
-static int64_t
-driSwapBuffers(__GLXDRIdrawable * pdraw, int64_t unused1, int64_t unused2,
-	       int64_t unused3)
+static uint64_t
+driSwapBuffers(__GLXDRIdrawable * pdraw, uint64_t unused1, uint64_t unused2,
+	       uint64_t unused3)
 {
    (*pdraw->psc->core->swapBuffers) (pdraw->driDrawable);
    return 0;
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 1b94a56..4d229ef 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -334,10 +334,12 @@ driCreateDrawable(__GLXscreenConfigs * psc,
    return pdraw;
 }
 
-static void
-driSwapBuffers(__GLXDRIdrawable * pdraw)
+static uint64_t
+driSwapBuffers(__GLXDRIdrawable * pdraw, uint64_t unused1, uint64_t unused2,
+	       uint64_t unused3)
 {
    (*pdraw->psc->core->swapBuffers) (pdraw->driDrawable);
+   return 0;
 }
 
 static void
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index 8e5dc78..f95412b 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -136,19 +136,19 @@ struct __GLXDRIscreenRec {
 				       GLXDrawable glxDrawable,
 				       const __GLcontextModes *modes);
 
-   int64_t (*swapBuffers)(__GLXDRIdrawable *pdraw, int64_t target_msc,
-			  int64_t divisor, int64_t remainder);
+   uint64_t (*swapBuffers)(__GLXDRIdrawable *pdraw, uint64_t target_msc,
+			   uint64_t divisor, uint64_t remainder);
    void (*copySubBuffer)(__GLXDRIdrawable *pdraw,
 			 int x, int y, int width, int height);
    void (*waitX)(__GLXDRIdrawable *pdraw);
    void (*waitGL)(__GLXDRIdrawable *pdraw);
    int (*getDrawableMSC)(__GLXscreenConfigs *psc, __GLXDRIdrawable *pdraw,
-			 int64_t *ust, int64_t *msc, int64_t *sbc);
-   int (*waitForMSC)(__GLXDRIdrawable *pdraw, int64_t target_msc,
-		     int64_t divisor, int64_t remainder, int64_t *ust,
-		     int64_t *msc, int64_t *sbc);
-   int (*waitForSBC)(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
-		     int64_t *msc, int64_t *sbc);
+			 uint64_t *ust, uint64_t *msc, uint64_t *sbc);
+   int (*waitForMSC)(__GLXDRIdrawable *pdraw, uint64_t target_msc,
+		     uint64_t divisor, uint64_t remainder, uint64_t *ust,
+		     uint64_t *msc, uint64_t *sbc);
+   int (*waitForSBC)(__GLXDRIdrawable *pdraw, uint64_t target_sbc,
+		     uint64_t *ust, uint64_t *msc, uint64_t *sbc);
    void (*setSwapInterval)(__GLXDRIdrawable *pdraw, int interval);
    int (*getSwapInterval)(__GLXDRIdrawable *pdraw);
 };
@@ -786,7 +786,7 @@ extern const char __glXGLClientVersion[];
 extern const char __glXGLClientExtensions[];
 
 /* Get the unadjusted system time */
-extern int __glXGetUST(int64_t * ust);
+extern int __glXGetUST(uint64_t * ust);
 
 extern GLboolean __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
                                     int32_t * numerator,
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 49cbce7..21ac7b9 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -2131,7 +2131,7 @@ __glXQueryFrameTrackingMESA(Display * dpy, GLXDrawable drawable,
 static int
 __glXGetVideoSyncSGI(unsigned int *count)
 {
-   int64_t ust, msc, sbc;
+   uint64_t ust, msc, sbc;
    int ret;
    GLXContext gc = __glXGetCurrentContext();
    __GLXscreenConfigs *psc;
@@ -2171,7 +2171,7 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
    GLXContext gc = __glXGetCurrentContext();
    __GLXscreenConfigs *psc;
    __GLXDRIdrawable *pdraw;
-   int64_t ust, msc, sbc;
+   uint64_t ust, msc, sbc;
    int ret;
 
    if (divisor <= 0 || remainder < 0)
@@ -2350,7 +2350,7 @@ __glXQueryMaxSwapBarriersSGIX(Display * dpy, int screen, int *max)
 */
 static Bool
 __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
-                      int64_t * ust, int64_t * msc, int64_t * sbc)
+                      uint64_t * ust, uint64_t * msc, uint64_t * sbc)
 {
    __GLXdisplayPrivate * const priv = __glXInitialize(dpy);
    int i, ret;
@@ -2485,9 +2485,9 @@ __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
 }
 
 
-static int64_t
+static uint64_t
 __glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable,
-                       int64_t target_msc, int64_t divisor, int64_t remainder)
+                       uint64_t target_msc, uint64_t divisor, uint64_t remainder)
 {
    GLXContext gc = __glXGetCurrentContext();
    int screen;
@@ -2525,9 +2525,9 @@ __glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable,
 
 static Bool
 __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
-                   int64_t target_msc, int64_t divisor,
-                   int64_t remainder, int64_t * ust,
-                   int64_t * msc, int64_t * sbc)
+                   uint64_t target_msc, uint64_t divisor,
+                   uint64_t remainder, uint64_t * ust,
+                   uint64_t * msc, uint64_t * sbc)
 {
    int screen;
    __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
@@ -2566,8 +2566,8 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
 
 static Bool
 __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
-                   int64_t target_sbc, int64_t * ust,
-                   int64_t * msc, int64_t * sbc)
+                   uint64_t target_sbc, uint64_t * ust,
+                   uint64_t * msc, uint64_t * sbc)
 {
    int screen;
    __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
@@ -3152,7 +3152,7 @@ PUBLIC void (*glXGetProcAddress(const GLubyte * procName)) (void)
  * \since Internal API version 20030317.
  */
 _X_HIDDEN int
-__glXGetUST(int64_t * ust)
+__glXGetUST(uint64_t * ust)
 {
    struct timeval tv;
 
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 75c9882..0012cea 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -343,15 +343,15 @@ static void driSwapBuffers(__DRIdrawable *dPriv)
 }
 
 static int driDrawableGetMSC( __DRIscreen *sPriv, __DRIdrawable *dPriv,
-			      int64_t *msc )
+			      uint64_t *msc )
 {
     return sPriv->DriverAPI.GetDrawableMSC(sPriv, dPriv, msc);
 }
 
 
-static int driWaitForMSC(__DRIdrawable *dPriv, int64_t target_msc,
-			 int64_t divisor, int64_t remainder,
-			 int64_t * msc, int64_t * sbc)
+static int driWaitForMSC(__DRIdrawable *dPriv, uint64_t target_msc,
+			 uint64_t divisor, uint64_t remainder,
+			 uint64_t * msc, uint64_t * sbc)
 {
     __DRIswapInfo  sInfo;
     int  status;
@@ -872,7 +872,7 @@ driQueryFrameTracking(__DRIdrawable *dpriv,
 {
    __DRIswapInfo   sInfo;
    int             status;
-   int64_t         ust;
+   uint64_t        ust;
    __DRIscreen *psp = dpriv->driScreenPriv;
 
    status = dpriv->driScreenPriv->DriverAPI.GetSwapInfo( dpriv, & sInfo );
@@ -923,8 +923,8 @@ const __DRIframeTrackingExtension driFrameTrackingExtension = {
  *       be possible to cache the sync rate?
  */
 float
-driCalculateSwapUsage( __DRIdrawable *dPriv, int64_t last_swap_ust,
-		       int64_t current_ust )
+driCalculateSwapUsage( __DRIdrawable *dPriv, uint64_t last_swap_ust,
+		       uint64_t current_ust )
 {
    int32_t   n;
    int32_t   d;
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index 99c0f1e..bca60d1 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -196,14 +196,14 @@ struct __DriverAPIRec {
      * These are required if GLX_OML_sync_control is supported.
      */
     /*@{*/
-    int (*WaitForMSC)( __DRIdrawable *priv, int64_t target_msc, 
-		       int64_t divisor, int64_t remainder,
-		       int64_t * msc );
-    int (*WaitForSBC)( __DRIdrawable *priv, int64_t target_sbc,
-		       int64_t * msc, int64_t * sbc );
-
-    int64_t (*SwapBuffersMSC)( __DRIdrawable *priv, int64_t target_msc,
-			       int64_t divisor, int64_t remainder );
+    int (*WaitForMSC)( __DRIdrawable *priv, uint64_t target_msc,
+		       uint64_t divisor, uint64_t remainder,
+		       uint64_t * msc );
+    int (*WaitForSBC)( __DRIdrawable *priv, uint64_t target_sbc,
+		       uint64_t * msc, uint64_t * sbc );
+
+    uint64_t (*SwapBuffersMSC)( __DRIdrawable *priv, uint64_t target_msc,
+			       uint64_t divisor, uint64_t remainder );
     /*@}*/
     void (*CopySubBuffer)(__DRIdrawable *driDrawPriv,
 			  int x, int y, int w, int h);
@@ -215,7 +215,7 @@ struct __DriverAPIRec {
      */
     int (*GetDrawableMSC) ( __DRIscreen * priv,
 			    __DRIdrawable *drawablePrivate,
-			    int64_t *count);
+			    uint64_t *count);
 
 
 
@@ -236,7 +236,7 @@ struct __DRIswapInfoRec {
      * Unadjusted system time of the last buffer swap.  This is the time
      * when the swap completed, not the time when swapBuffers was called.
      */
-    int64_t   swap_ust;
+    uint64_t   swap_ust;
 
     /**
      * Number of swap operations that occurred after the swap deadline.  That
@@ -358,8 +358,8 @@ struct __DRIdrawableRec {
      *   actual_target = target_msc - msc_base + vblank_base;
      */
     /*@{*/
-    int64_t vblank_base;
-    int64_t msc_base;
+    uint64_t vblank_base;
+    uint64_t msc_base;
     /*@}*/
 
     /**
@@ -560,7 +560,7 @@ __driUtilUpdateDrawableInfo(__DRIdrawable *pdp);
 
 extern float
 driCalculateSwapUsage( __DRIdrawable *dPriv,
-		       int64_t last_swap_ust, int64_t current_ust );
+		       uint64_t last_swap_ust, uint64_t current_ust );
 
 extern GLint
 driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 );
diff --git a/src/mesa/drivers/dri/common/vblank.c b/src/mesa/drivers/dri/common/vblank.c
index 49b22a2..a92e259 100644
--- a/src/mesa/drivers/dri/common/vblank.c
+++ b/src/mesa/drivers/dri/common/vblank.c
@@ -34,14 +34,14 @@
 #include "vblank.h"
 #include "xmlpool.h"
 
-static unsigned int msc_to_vblank(__DRIdrawable * dPriv, int64_t msc)
+static unsigned int msc_to_vblank(__DRIdrawable * dPriv, uint64_t msc)
 {
    return (unsigned int)(msc - dPriv->msc_base + dPriv->vblank_base);
 }
 
-static int64_t vblank_to_msc(__DRIdrawable * dPriv, unsigned int vblank)
+static uint64_t vblank_to_msc(__DRIdrawable * dPriv, unsigned int vblank)
 {
-   return (int64_t)(vblank - dPriv->vblank_base + dPriv->msc_base);
+   return (uint64_t)(vblank - dPriv->vblank_base + dPriv->msc_base);
 }
 
 
@@ -55,7 +55,7 @@ static int64_t vblank_to_msc(__DRIdrawable * dPriv, unsigned int vblank)
  *
  * \warning This function is called from \c glXGetVideoSyncSGI, which expects
  * a \c count of type \c unsigned (32-bit), and \c glXGetSyncValuesOML, which 
- * expects a \c count of type \c int64_t (signed 64-bit).  The kernel ioctl 
+ * expects a \c count of type \c uint64_t (unsigned 64-bit).  The kernel ioctl
  * currently always returns a \c sequence of type \c unsigned.
  *
  * \param priv   Pointer to the DRI screen private struct.
@@ -66,7 +66,7 @@ static int64_t vblank_to_msc(__DRIdrawable * dPriv, unsigned int vblank)
  */
 int driDrawableGetMSC32( __DRIscreen * priv,
 			 __DRIdrawable * dPriv,
-			 int64_t * count)
+			 uint64_t * count)
 {
    drmVBlank vbl;
    int ret;
@@ -123,15 +123,15 @@ int driDrawableGetMSC32( __DRIscreen * priv,
  */
 
 int driWaitForMSC32( __DRIdrawable *priv,
-		     int64_t target_msc, int64_t divisor, int64_t remainder,
-		     int64_t * msc )
+		     uint64_t target_msc, uint64_t divisor, uint64_t remainder,
+		     uint64_t * msc )
 {
    drmVBlank vbl;
 
 
    if ( divisor != 0 ) {
-      int64_t next = target_msc;
-      int64_t r;
+      uint64_t next = target_msc;
+      uint64_t r;
       int dont_wait = (target_msc == 0);
 
       do {
@@ -164,7 +164,7 @@ int driWaitForMSC32( __DRIdrawable *priv,
           * If this refresh has already happened, we add divisor to obtain 
           * the next refresh after the current one that will satisfy it.
           */
-         r = ((uint64_t)*msc % divisor);
+         r = (*msc % divisor);
          next = (*msc - r + remainder);
          if (next <= *msc)
 	    next += divisor;
diff --git a/src/mesa/drivers/dri/common/vblank.h b/src/mesa/drivers/dri/common/vblank.h
index 29d1ad8..de6288b 100644
--- a/src/mesa/drivers/dri/common/vblank.h
+++ b/src/mesa/drivers/dri/common/vblank.h
@@ -44,12 +44,12 @@
 #define VBLANK_FLAG_SECONDARY (1U << 8)  /* Wait for secondary vblank.
 					  */
 
-extern int driGetMSC32( __DRIscreen * priv, int64_t * count );
+extern int driGetMSC32( __DRIscreen * priv, uint64_t * count );
 extern int driDrawableGetMSC32( __DRIscreen * priv,
 				__DRIdrawable * drawablePrivate,
-				int64_t * count);
+				uint64_t * count);
 extern int driWaitForMSC32( __DRIdrawable *priv,
-    int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc );
+    uint64_t target_msc, uint64_t divisor, uint64_t remainder, uint64_t * msc );
 extern GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache );
 extern void driDrawableInitVBlank ( __DRIdrawable *priv );
 extern unsigned driGetVBlankInterval( const  __DRIdrawable *priv );
diff --git a/src/mesa/drivers/dri/mga/mgacontext.h b/src/mesa/drivers/dri/mga/mgacontext.h
index 4141565..2f7b86c 100644
--- a/src/mesa/drivers/dri/mga/mgacontext.h
+++ b/src/mesa/drivers/dri/mga/mgacontext.h
@@ -257,8 +257,8 @@ struct mga_context_t {
    drmBufPtr  vertex_dma_buffer;
    drmBufPtr  iload_buffer;
 
-   int64_t swap_ust;
-   int64_t swap_missed_ust;
+   uint64_t swap_ust;
+   uint64_t swap_missed_ust;
 
    GLuint swap_count;
    GLuint swap_missed_count;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 13f1f06..0afd628 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -573,7 +573,7 @@ static GLboolean radeonPageFlip( __DRIdrawable *dPriv )
  */
 void radeonSwapBuffers(__DRIdrawable * dPriv)
 {
-	int64_t ust;
+	uint64_t ust;
 	__DRIscreen *psp;
 
 	if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h
index 5156c5d..31b6a0d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -104,8 +104,8 @@ struct radeon_framebuffer
 	GLuint vbl_waited;
 
 	/* buffer swap */
-	int64_t swap_ust;
-	int64_t swap_missed_ust;
+	uint64_t swap_ust;
+	uint64_t swap_missed_ust;
 
 	GLuint swap_count;
 	GLuint swap_missed_count;
diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h
index 4e1ab3a..734b540 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.h
+++ b/src/mesa/drivers/dri/unichrome/via_context.h
@@ -322,8 +322,8 @@ struct via_context {
     */
    driOptionCache optionCache;
 
-   int64_t swap_ust;
-   int64_t swap_missed_ust;
+   uint64_t swap_ust;
+   uint64_t swap_missed_ust;
 
    GLuint swap_count;
    GLuint swap_missed_count;
-- 
1.6.0.6

