From f6efecdfefa161c68fc5bf193a6487fc1a5047d5 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Fri, 29 Mar 2013 11:09:48 -0700 Subject: boilerplate/gl: Disable thread awareness This dramatically speeds up testing on NVidia and actually makes it possible to run traces within a reasonable amount of time. cairo-perf-trace results for: NVIDIA Corporation GeForce GTS 250/PCIe/SSE2 3.3.0 NVIDIA 310.14 Before: test min(s) median(s) stddev. count gvim 30.924 31.251 0.72% 5/6 firefox-fishbowl 168.751 201.017 12.46% 8/8 (exited early) After: test min(s) median(s) stddev. count gvim 1.294 1.325 1.79% 6/6 firefox-fishbowl 18.540 19.104 1.54% 6/6 --- boilerplate/cairo-boilerplate-egl.c | 2 ++ boilerplate/cairo-boilerplate-glx.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/boilerplate/cairo-boilerplate-egl.c b/boilerplate/cairo-boilerplate-egl.c index e1a46e44..99bee64c 100644 --- a/boilerplate/cairo-boilerplate-egl.c +++ b/boilerplate/cairo-boilerplate-egl.c @@ -130,6 +130,8 @@ _cairo_boilerplate_egl_create_surface (const char *name, } gltc->device = cairo_egl_device_create (gltc->dpy, gltc->ctx); + if (mode == CAIRO_BOILERPLATE_MODE_PERF) + cairo_gl_device_set_thread_aware(gltc->device, FALSE); if (width < 1) width = 1; diff --git a/boilerplate/cairo-boilerplate-glx.c b/boilerplate/cairo-boilerplate-glx.c index 52cd99f9..06436446 100644 --- a/boilerplate/cairo-boilerplate-glx.c +++ b/boilerplate/cairo-boilerplate-glx.c @@ -135,6 +135,9 @@ _cairo_boilerplate_gl_create_surface (const char *name, gltc->ctx = ctx; gltc->device = cairo_glx_device_create (dpy, ctx); + if (mode == CAIRO_BOILERPLATE_MODE_PERF) + cairo_gl_device_set_thread_aware(gltc->device, FALSE); + gltc->surface = surface = cairo_gl_surface_create (gltc->device, content, width, height); if (cairo_surface_status (surface)) -- cgit v1.2.3