Summary:
GL engine has used integer coordinates system since it's born though
OpenGL basically uses floating point vertex coordinates system.
There were many dissatisfaction, complaints about this
since object's transition is jiggled, not perfectly smooth.
It's obvious because Positioning must be stepping with integer units
without any subpixel rendering.
Our gl engine currently supports msaa options and evas map allows to
have double precivion coordinates system, our engine must do handle this over as well,
to work together.
If you don't like change,
We could switch behaviors optionally (turn on, only when msaa is enabled)
But I think it's pointless using integer coordinates system in GL thesedays.
It just make code complex to maintain.
There will be an additional patch coming for SW backend map behavior soon.
Left: before patch
Right: after patch
{F3694624}
Reviewers: #committers, raster
Reviewed By: #committers, raster
Subscribers: raster, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8552
so getting context at least on some dviers is expensive. it may really
impact cpu usage a lot (in this cate getpid() was being called by the
nouveau drivers and that can be expensive. it is on ARM as it's a full
syscall and 1-2% of cpu time was just getting pid all the time thanks
to this...
@opt
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
Summary:
The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded. See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html
Fix various typos and misspellings
lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries. This change fixes the ones it identified in 1.20.6.
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5584
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
There's actually an array of 2 in gl_x11, but it appears we only use the
first 1, except in an #if 0 block.
I gather this is legacy for some reason - it sure doesn't seem to make
any sense now, so I'm chopping off all the extra array indexes.
Note: I've not changed gl_sdl - it looks like it doesn't use the context
or surface at all and they could just be removed, but I don't build that
one here and don't want to touch it.
Thank you NVIDIA for breaking your drivers regularly!
eglGetDisplay(x11_display) should work but was consistently
returning 0 instead.
Apparently EGL 1.5 introduced "eglGetPlatformDisplay" that
is more advanced to open a display. So, prefer that over
eglGetDisplay if it's available.
@fix
this technically isn't needed. it does help in some cases hide driver
or other buffer swap bugs, but in and of itself is not needed, so
remove. at least the drm egl bugs still happen on my pi3 so its
something else...
KHR partial damage must be set once at the beginning of rendering with
buffer damage for the entire scene to be rendered. Doing otherwise can
result in graphical anomalies on some GL implementations.
Some engines should using sending surface damage, until now we'd only ever
provided them with buffer damage.
The difference is that surface damage is the damage to the surface the
compositor is displaying, and the buffer damage is the damage to the
buffer the client has rendered. These are different when the client
is using multiple buffers of different ages to render into.
Anything that calls eglSwapBuffersWithDamage, wl_surface_damage() or
wl_surface_damage_buffer() should be using surface damage, and not
buffer damage.
This patch is intended to make no functional change - any flush cb that
used buffer damage before still should. Actual fixes to follow.
Apologies if I broke any engines - it's a bit of a copy and wasteland
out here.
This is reverts:
e4c641ed1e
build fix
19eb7b727fbf35620a13fb65b50d3056a484360e:
glx: Fix black windows in E on nvidia
For all extension functions, we need to match with the extension itself
since GetProcAddress() can return a non-NULL value even when the function
does not exist. Drivers can do a runtime mapping depending on the
context. So, we only trust the return value of GetProcAddress() when
we know for sure that the extension exists.
Thus, if a symbol exists we will always prefer it rather than relying
on GetProcAddress().
Also, glGetString(GL_EXTENSIONS) is now deprecated so we're lucky
it still works most of the time. glGetStringi() should be used
instead. This patch changes some of the use cases, but not all.
Fixes T3030 (again)
Fixes T4288
@fix
it serems some changes broke our buffer age querying - we were using
the wrong symbol... the EXT or ARGB onenot the core one which does
work. use that first. then we get buffer age.
@fix
This fixes an issue from 19eb7b727f where the code
would no longer compile due to not finding noext_glXCreatePixmap in
the structure. This was due to the fact that this field was not
compiled into the structure if gl_gles was defined.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This fixes calls to glXCreatePixmap that would consistently
fail on nvidia >= 360.
It seems glXCreatePixmapEXT was used instead of glXCreatePixmap,
and that function always returned 0.
One could assume always using the non-EXT version of the
function should be preferred. Unfortunately, doing so for all
the other functions brings back the black windows.
I'm taking a very careful approach by doing this only for drivers
>= 360.
Fixes T3030
@fix
Summary:
Disables GLES3 support when it cannot be determined that it is
available. Prevents to repeatly request a (missing) gles3 support and
fail.
Fixes T3795.
Reviewers: jpeg
Subscribers: cedric, jpeg
Maniphest Tasks: T3795
Differential Revision: https://phab.enlightenment.org/D4014
some font glyphs are still allocated after tyhe last gl window is
freed which means we can't make current anymore to free textures after
that. this fixes that by flushing gl texture info from the font cache
when the last gl windows are gone.
@fix
When gl window is created, XCreateColormap is called in eng_best_visual_get
but when gl window is freed, Colormap is not freed.
See original patch: D3342.
This is the kind of horrible things you'll encounter when working
with GL. The surface and context need to have matching configuration
otherwise make current will fail, and the only way to get a matching
config is to reuse the config selected to create the context. Gah.
This is the same fix as for EGL. More a hack than a fix, to be honest.
@fix
This is an optimization for EGL only and for the main loop only.
eglGetCurrent{Display,Context,Surface} are expensive calls (they
shouldn't be, but they are). eglMakeCurrent is also very expensive,
so we want as much as possible to avoid calling those functions.
Store the pointers for the main loop as static variables.
Valgrind stats for a quick scrolling session in elm_test:
Before this patch:
- eglGetCurrentContext ~ 0.4%
- eglGetCurrentDisplay ~ 0.4%
After this patch:
- evas_eglGetCurrentContext ~ 0.02%
- evas_eglGetCurrentDisplay ~ 0.02%
There was a terribly complex mechanism to call this function
from the gl_x11 engine to gl_common (evas gl core)... and it
simply didn't work because the function pointer would be NULL.
Summary:
When Evas GL apis are called outside of on pixels callback,
evas gl backend context may have been made current, and Evas GL will
render into a wrong context.
So here we provide context restore mechanism of keeping track of
currently bound context and calling make current when needed.
@feature
Test Plan: Run Evas GL test cases
Reviewers: jpeg, cedric
Subscribers: mythri, mer.kim, wonsik, cedric
Differential Revision: https://phab.enlightenment.org/D2956
Summary:
If EGL_KHR_partial_update extension is implemented by the driver,
set the damage region. This is done before the draw calls.
@feature
Reviewers: wonsik, spacegrapher, jpeg
Reviewed By: spacegrapher
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2828
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: This fixes Coverity CID1293519 where einfo was being used
Before it was being null checked (which Could have caused a crash if
in fact einfo Was NULL).
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Test case:
- Elementary Test
-- GLView
--- Direct rendering
Direct rendering would never happen in reality, because Evas GL
had to fallback. The reason being that DR requires the window
to have a depth buffer, but this depth buffer was no present
in the default config.
From elm, the solution is to set a special accel_preference,
for instance "gl:depth". But setting this value right before
calling elm_win_add() for the GLView test was already too late.
Indeed, evas_x would keep the default configurations and reuse
them no matter what was requested (ie. only RGB and RGBA would
work).
Solution:
Implement a slightly more complex cache based on a hash map instead
of just two static variables. Always request a new config if it's
not found in the current hash. Store that config, and reuse it for
the same config requests.
Tons of line changes because of the name changes and the whitespace
adjustments. Also some variables disappeared into the magic hash table.
Summary:
There is a restriction for some gpu drivers that
eglGetProcAddress must be called after eglMakeCurrent.
So separate egl/glx extensions check from gl_symbols
to be called inside eng_window_new.
Test Plan: egl and glx backend tests
Reviewers: cedric, jpeg
Subscribers: cedric, mer.kim, wonsik
Differential Revision: https://phab.enlightenment.org/D2193
This reverts commit 0585540bb3.
This broke Evas 3d examples. I also suspected some weird things and
wasn't 100% confident with this patch.
Closes T2215.
Thanks for the report.
Depth32, Stencil16 and MSAA are known to be unsupported on many platforms.
While applications should try not to request them, we can try to fallback
nicely and still render using depth24+stencil8 (which is often supported),
or reducing the number of MSAA samples (until 0 if not supported at all).
Summary:
When Evas GL runs with direct rendering, it can not set depth, stencil and msaa to Window surface.
This patch is possible to use "option" input paramater of ecore_evas_gl_x11_options_new.
So, new API is not needed.
The other patch is in elementary. The elementary patch will be used this patch.
Test Plan: Test elm gl veiw in elementary_test and JP's test app.
Reviewers: spacegrapher, cedric, raster, jpeg
Reviewed By: jpeg
Subscribers: cedric, mer.kim
Differential Revision: https://phab.enlightenment.org/D2144
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Note: jpeg changed the original patch a bit (fix style and depth value)
Automatically fallback to OpenGL ES 2.0 if OpenGL ES 3 is not supported.
This is a first step in trying to support GLES 3 for Evas GL.
This commit is also a wild test to see whether using GLES 3 contexts
by default will break anything. The theory says that GLES 3 is
backwards compatible with GLESv2.
So, if anything GL breaks for you... scream loudly!
But before reporting any bugs, please set the env variable:
- export EVAS_GL_DISABLE_GLES3=1
This does not add any requirement for GLESv3 support.
Summary: If eglGetError sequencially called, second eglGetError() doesn't give the information of real Error.
@fix
Reviewers: raster, jpeg, cedric, Hermet
Subscribers: cedric, spacegrapher, wonsik
Differential Revision: https://phab.enlightenment.org/D1982
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>