glx: print FPS with 2 decimal places
[mesa.git] / src / glx / dri2_glx.c
index f4a4a6ce408f08ef76aff1e488a1a68ffc5e218b..f7e306e5dbca2fa94308aa44a5cb800b713733b7 100644 (file)
@@ -599,7 +599,7 @@ __dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y,
    flags = __DRI2_FLUSH_DRAWABLE;
    if (flush)
       flags |= __DRI2_FLUSH_CONTEXT;
-   dri2Flush(psc, ctx, priv, flags, __DRI2_THROTTLE_SWAPBUFFER);
+   dri2Flush(psc, ctx, priv, flags, __DRI2_THROTTLE_COPYSUBBUFFER);
 
    region = XFixesCreateRegion(psc->base.dpy, &xrect, 1);
    DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region,
@@ -776,7 +776,7 @@ static void show_fps(struct dri2_drawable *draw)
 
    if (draw->previous_time + interval * 1000000 <= current_time) {
       if (draw->previous_time) {
-         fprintf(stderr, "libGL: FPS = %.1f\n",
+         fprintf(stderr, "libGL: FPS = %.2f\n",
                  ((uint64_t)draw->frames * 1000000) /
                  (double)(current_time - draw->previous_time));
       }
@@ -1135,7 +1135,6 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
 
       __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
       __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
-      __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
 
       if ((mask & ((1 << __DRI_API_GLES) |
                    (1 << __DRI_API_GLES2) |
@@ -1245,7 +1244,7 @@ dri2CreateScreen(int screen, struct glx_display * priv)
 
    psc->fd = loader_open_device(deviceName);
    if (psc->fd < 0) {
-      ErrorMessageF("failed to open drm device: %s\n", strerror(errno));
+      ErrorMessageF("failed to open %s: %s\n", deviceName, strerror(errno));
       goto handle_error;
    }