[Mesa-dev] [PATCH] glx/dri2: print FPS when env var MESA_SHOW_FPS is 1

Michel Dänzer michel at daenzer.net
Wed Jan 4 00:51:07 PST 2012


On Mit, 2012-01-04 at 06:05 +0100, Marek Olšák wrote: 
> This is useful for apps which don't print FPS.
> Only enabled in SwapBuffers.
> ---
>  src/glx/dri2_glx.c |   36 +++++++++++++++++++++++++++++++++++-
>  1 files changed, 35 insertions(+), 1 deletions(-)
> 
> diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
> index a9bcebf..394823a 100644
> --- a/src/glx/dri2_glx.c
> +++ b/src/glx/dri2_glx.c
> @@ -1002,6 +1033,9 @@ dri2CreateScreen(int screen, struct glx_display * priv)
>     Xfree(driverName);
>     Xfree(deviceName);
>  
> +   tmp = getenv("MESA_SHOW_FPS");

BTW, this would be the first environment variable recognized by libGL
that starts with MESA_, so far all of them have started with LIBGL_. Not
sure it's a problem, just pointing it out.


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the mesa-dev mailing list