was using evas' window surface to do its resource creation and it
wans't properly updated when a window is destroyed and recreated.
Also, deleted some whitespaces.
SVN revision: 74771
NOTE: this improve some test by 10 to 15% some other are down by 5%.
Their is still more tunning and improvement possible now (Particularly
with Map), but it will do for now.
SVN revision: 73264
- Added (w,h) <=0 dimension check for evas_gl_surface_create()
- Changed evas_gl_make_current to return error when either
surface or context is NULL. Semantically, this was allowed
before but it was changed to reflect eglMakeCurrent behavior.
- evas_gl_make_current - detached any previously attached
buffers before attaching new ones to an FBO during a make_current.
- Used dynamic memory for extension string allocation for safety.
SVN revision: 72926
handling in EGL environment. Also fixed some minor issues
regarding checking surface capabilities. Apparently, some
GL drivers do not allow FBO to only have depth or stencil
buffers attached to the FBO without the color buffer attached
to them.
SVN revision: 72108
Now evas will in all case do the layout during the prepare stage. It will do that
once and as long as the text didn't change. This does improve by a factor of at
least 2.3 in all expedite test case except the text change that only get a 30%
increase (I expect a drop in performance on non pipe rendering for text change
expedite test only, but this case is not common in real life).
This also fix the issue that show random size glyph when using pipe rendering.
SVN revision: 71220
Currently, this feature is only supported in EGL/GLESv2 environment
with GL_IMG_multisampled_render_to_texture extension supported.
_____________________
from: (sanghee park) sh15.park@samsung.com
Dear all,
I compose this mail to ask reviewal this patch about multisampling on the evasgl.
I want to make multisampling capacity to enhance rendering quality of the evasgl.
But if MSAA is applied always, this have possibility lowering rendering performance,
I separated user's input level to high, mid, low, none.
If you want to test this patch, try to examine rendering qulity on EGL circumstance with multisampling level.
Plaese review it, and any suggestion will be appreciated.
Best Regards,
SangHee
SVN revision: 70992
Mainly, glDeleteBuffers was being called instead of glDeleteRenderbuffers.
Also, there was an error when checking if surface is valid.
SVN revision: 70870
(Trying it again since this commit broke evas build yesterday.)
Previously, evas_gl_surface_create() didn't actually do
the render buffer attach to the the FBO. It was performed when
the make_current was called for the first time. The issue
was that even though the surface was successfully created with
the given configuration, there was a possibility of make_current
failing with the error message "FBO not complete" because of
the surface configuration.
So, I've added a piece of code that checks the FBO
capabilities beforehand to set up a available surface configurations
so that it doesn't have to fail during make_current for unsupported
surface format.
Also, I've changed the surface config in a way that once the
user calls evas_gl_surface_create(), evas gl sets the config
parameter with configuration that evas_gl is actually using.
SVN revision: 70680
Previously, evas_gl_surface_create() didn't actually do
the render buffer attach to the the FBO. It was performed when
the make_current was called for the first time. The issue
was that even though the surface was successfully created with
the given configuration, there was a possibility of make_current
failing with the error message "FBO not complete" because of
the surface configuration.
So, I've added a piece of code that checks the FBO
capabilities beforehand to set up a available surface configurations
so that it doesn't have to fail during make_current for unsupported
surface format.
Also, I've changed the surface config in a way that once the
user calls evas_gl_surface_create(), evas gl sets the config
parameter with configuration that evas_gl is actually using.
SVN revision: 70617
Subject: image data get/set pairing issue
I found a bug about pairing
evas_object_image_data_get/set(eng_image_data_get/put).
It was added to count checked_out for paring
eglMapImageSEC/eglUnmapImageSEC.
In case of calling evas_object_image_data_set() twice after calling
evas_object_image_data_get(), dyn.checked_out has -1.
Then, if evas_object_image_data_get() and evas_object_image_data_set()
is call, it can't call eglUnmapImageSEC().
If dyn.checked_out has minus, it can make some problem.
So, I fixed this problem.
Please find enclosed patch file and let me know if I misunderstood.
SVN revision: 68504
option.
It should have been OR instead of AND operator.
When the image object alpha is on "OR" the rotation angle
is not "0", direct rendering isn't allowed. However,
allow direct rendering if EVAS_GL_DIRECT_OVERRIDE=1 is set.
SVN revision: 67521
This optimization is significant for rendering to a large surface
because it'l save an extra copy overhead as well as an extra rendering pass.
To enable it, you can give EVAS_GL_OPTIONS_DIRECT hint in the surface
config options_bits. The following conditions have to be met in order
for evas to render directly into the Evas' window. If they are not met, the
engine will fallback to rendering to an FBO as it normally does.
conditions:
1.) All the GL calls have to be called using the pixel_get_callback function.
This is necessary for the evas object order to be maintained.
2.) Alpha must be disabled on the image ojbect that renders evas_gl.
3.) No rotation allowed.
One way to override above condition is to set EVAS_GL_DIRECT_OVERRIDE=1 but
there is no guarantee in its behavior.
Currently, this optimization is added for gl_x11 engine only.
SVN revision: 67388
to ensure backward compatibility. Previously, the user
simply declared a Evas_GL_Config object but this can
cause problems if more config options are added. So,
we have Evas allocate the config object for the user
so it can handle addition in the future.
Also, added some safety code around _extensions_init
SVN revision: 67141
intel drivers don;'t like it for some odd reason - i'm trying to track
it down but i can't sanely try middlegrounds right now (eg dont
dlopen/dlsym but actually directly assign symbols etc.), so back out
and let's figure this out before it goes back in :(
SVN revision: 66308
addition to evas gl backend.
Working on different mobile devices, we've noticed that the cost of context
switch (MakeCurrent) in GL can be very expensive depending on the driver
implementation. To minimize the poorly written driver's context switch
overhead, I've implemented a state tracking layer on top of the driver
implemented GL.
Essentially, this layer wraps all the GL/Glue(GLX/EGL) APIs and manages its own
state changes. Internally, only one real GL context is created and logical
contexts are created every time a user requests context creation. The logical
contexts keep track of its states and sets only the necessary states
(the ones that are different than the current ones)
when there is a MakeCurrent request. The real MakeCurrent gets called when
there is a Surface/Window change request.
The GL library is dlopened and all the APIs are dlsym'ed and wrapped
accordingly. All the GL functions are in evas_gl_core.{h,c}.
Here's a very simply flow of the code.
- all the APIs are exported as function pointers (*glsym_glBegin),
(*glsm_eglCreatContext), and etc.
- all the native GL/Glue(GLX/EGL) APIs are dlsym'ed as _sym_glBegin,
_sym_eglCreateContext, and etc.
- all the fastpath APIs are implmemnted as fpgl_glBegin,
fpgl_eglCreateContext, and etc.
- if faspath is seletected, the exported APIs are set accordingly
ie. glsym_glBegin = fpgl_glBegin;
- default mode is the regular gl symbols are directly set.
ie. glsym_glBegin = _sym_glBegin;
I have an Environment variable where you can set it to three different Modes
EVAS_GL_FASTPATH = 0 // Default mode. Regular GL symbols are directly loaded
EVAS_GL_FASTPATH = 1 // Fastpath mode. Takes the path described above.
EVAS_GL_FASTPATH = 2 // Wrapped mode. All the regular GL functions are
wrapped once. This can be used for various
purposes
Since all the GL symbols are now loaded in this library, I took out all
the gl symbol loading parts in the evas gl backend as you'll see in the patch.
The changes to the engine and the backend itself is pretty minor.
There are still some known issues to hammer out but I thought we're at a good
place for an initial version so that my source doesn't diverge too much.
Known Issues and To Do's
* Current GL Fastpath version doesn't support multiple threads. Instead of
having one global real context, I would need to do it for each thread. I'll
get on this soon.
* Issues running Evas GL on certain conditions. When running the elementary
test (with gl engine), if you run ELMGLview test that runs in ON_DEMAND mode,
everything works fine. BUT, when you run the ELMGLView test in ALWAYS
mode, the subsequent elm tests shows blank screen. When you destroy the
GLView window, everything else comes on fine.
* Resource protection code. This actually applies to Evas GL code in general
as well. Since all the resources are shared among all the contexts that get
created, I would like to eventually have a resource protecting mechanism that
prevents access to resources outside of its context unless specifically
specified.
I'm attaching three files
- evas_gl_core.h, evas_gl_core.c, fastpath.patch
To get the code running...
- copy evas_gl_core.{c,h} to src/modules/engine/gl_common/
- apply the fastpath.patch
- compile/install evas
- to run with fastpath GL (ie. % EVAS_GL_FASTPATH=1 ./evasgl_sample1)
SVN revision: 65891
Subject: [E-devel] [E-Devel][Patch] Evas GL Color Format Enum change
(and ElmGLview changes accordingly)
I'm submitting a patch that changes the color format for Evas GL.
When I first wrote Evas_GL, I just had EVAS_GL_RGB_8 and EVAS_GL_RGBA_8 and etc
but it was misleading for some people. It was more of a filler since I couldn't decide on
a name. I'm finally changing it to make it more clear.
SVN revision: 64491