forked from enlightenment/efl
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
This commit is contained in:
parent
d5db69012e
commit
cb9dc80fdf
|
@ -2550,6 +2550,8 @@ eng_image_native_set(void *engine, void *image, void *native)
|
|||
n->ns_data.x11.multiple_buffer = 0;
|
||||
else
|
||||
n->ns_data.x11.multiple_buffer = 1;
|
||||
if (ob->detected.no_multi_buffer_native)
|
||||
n->ns_data.x11.multiple_buffer = 0;
|
||||
|
||||
if (!n->ns_data.x11.surface)
|
||||
{
|
||||
|
|
|
@ -75,6 +75,8 @@ struct _Outbuf
|
|||
unsigned char msaa;
|
||||
#ifndef GL_GLES
|
||||
Eina_Bool loose_binding : 1;
|
||||
#else
|
||||
Eina_Bool no_multi_buffer_native : 1;
|
||||
#endif
|
||||
} detected;
|
||||
|
||||
|
|
|
@ -345,6 +345,13 @@ try_gles2:
|
|||
eng_window_free(gw);
|
||||
return NULL;
|
||||
}
|
||||
// nvidia drivers in egl/gles mode dont need re-creating of the
|
||||
// eglimage ... and doign so is super slow on them, so avoid the
|
||||
// multi buffer path - as it's only for nvidia and this fixes
|
||||
// the performance regression there, it's fairly safe to do
|
||||
// as it's not universal across all drivers.
|
||||
if (strstr((const char *)vendor, "NVIDIA"))
|
||||
gw->detected.no_multi_buffer_native = 1;
|
||||
|
||||
eglGetConfigAttrib(gw->egl_disp, gw->egl_config, EGL_DEPTH_SIZE, &val);
|
||||
gw->detected.depth_buffer_size = val;
|
||||
|
|
Loading…
Reference in New Issue