summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-07-10 16:04:01 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-07-10 16:08:19 +0900
commitcb9dc80fdf88a4bbb345775d1ca8f83dc07d352b (patch)
tree48bebf6f6505aca365927b5805887aaac605a969 /src/modules
parentd5db69012ebcad914f1c4dae790fc19fd287f948 (diff)
evas gl-x11 engine - nvidia driver - fix performance drop
this has been going on for a while. on nvidia drivers in gles mode on x11 there is a massive perf drop to like a few fps with enough windows if we build for egl/gles instead of opengl. it was the re-creating of eglimages every frame. put a vendor specific workaround for this and avoid it. it's not needed there anyway. framerate back to 60fps smoothness afterwards. @fix
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c2
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.h2
-rw-r--r--src/modules/evas/engines/gl_x11/evas_x_main.c7
3 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index b76b3d51b4..dabadcbb02 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -2550,6 +2550,8 @@ eng_image_native_set(void *engine, void *image, void *native)
2550 n->ns_data.x11.multiple_buffer = 0; 2550 n->ns_data.x11.multiple_buffer = 0;
2551 else 2551 else
2552 n->ns_data.x11.multiple_buffer = 1; 2552 n->ns_data.x11.multiple_buffer = 1;
2553 if (ob->detected.no_multi_buffer_native)
2554 n->ns_data.x11.multiple_buffer = 0;
2553 2555
2554 if (!n->ns_data.x11.surface) 2556 if (!n->ns_data.x11.surface)
2555 { 2557 {
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.h b/src/modules/evas/engines/gl_x11/evas_engine.h
index c5cef71064..ed7277172d 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.h
+++ b/src/modules/evas/engines/gl_x11/evas_engine.h
@@ -75,6 +75,8 @@ struct _Outbuf
75 unsigned char msaa; 75 unsigned char msaa;
76#ifndef GL_GLES 76#ifndef GL_GLES
77 Eina_Bool loose_binding : 1; 77 Eina_Bool loose_binding : 1;
78#else
79 Eina_Bool no_multi_buffer_native : 1;
78#endif 80#endif
79 } detected; 81 } detected;
80 82
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 10ab397c9d..b86916966b 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -345,6 +345,13 @@ try_gles2:
345 eng_window_free(gw); 345 eng_window_free(gw);
346 return NULL; 346 return NULL;
347 } 347 }
348 // nvidia drivers in egl/gles mode dont need re-creating of the
349 // eglimage ... and doign so is super slow on them, so avoid the
350 // multi buffer path - as it's only for nvidia and this fixes
351 // the performance regression there, it's fairly safe to do
352 // as it's not universal across all drivers.
353 if (strstr((const char *)vendor, "NVIDIA"))
354 gw->detected.no_multi_buffer_native = 1;
348 355
349 eglGetConfigAttrib(gw->egl_disp, gw->egl_config, EGL_DEPTH_SIZE, &val); 356 eglGetConfigAttrib(gw->egl_disp, gw->egl_config, EGL_DEPTH_SIZE, &val);
350 gw->detected.depth_buffer_size = val; 357 gw->detected.depth_buffer_size = val;