Summary:
Summary : String buffer returned by eina_strbuf_new() is not freed in some cases
@Fix
Signed-off-by: Uma Devika <u.bodapati@samsung.com>
Reviewers: cedric, tasn, jpeg, raster, singh.amitesh
Subscribers: tanwar.umesh07, yashu21985, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5000
Summary:
Evas GL maintains internal resource (XWindow, EGL Window Surface, EGL Context)
per thread to be used for make current when indirect rendering is used.
Currently this internal resource is created regardless of current rendering mode,
and always created when a new Evas GL thread is created by the application.
Internal resource created in a new thread is not freed until evas shuts down
in the main thread, so this causes memory/fd leak.
This can be fixed by creating internal resource only in necessary cases (ie. indirect rendering),
and adding tls resource destructor to be called when thread exits.
Summary:
Add code for exception case for GL_OES_EGL_image/EGL_Image_KHR
These EvasGL's extension functions does not have the code for exception case.
e.g. EvasGLImage is NULL.
Test Plan: Native Pixmap surface's example is created and changed EvasGLImage's value(e.g. valid data or NULL)
Reviewers: raster, spacegrapher, jpeg
Subscribers: scholb.kim, JoogabYun, dkdk, cedric
Differential Revision: https://phab.enlightenment.org/D3284
Summary:
I found some bugs in EvasGL with OpenGL ES conformance test.
6 wrapper functions are added for GLES2,
(glDeleteFramebuffers, glFramebufferRenderbuffer
glFramebufferTexture2D, glGetError
glGetFloatv, glGetFramebufferAttachmentParameteriv)
3 wrapper fucntions are added for GLES3.
(glDrawbuffers, glGetStringi, glReadBuffer)
Test Plan:
GLES3 sample app,
EvasGL(OpenGL ES CTS) for 2.0 is passed.
For 3.0, 10 TCs are failed (Total : 2994TCs).
Reviewers: wonsik, spacegrapher, jpeg
Subscribers: cedric, JoogabYun, scholb.kim
Maniphest Tasks: T2621
Differential Revision: https://phab.enlightenment.org/D3301
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
Before this patch, those EGL/EvasGL functions can not work
without a current context. But EGL does not require any
current context for those to work, or at least, this should
be left to the driver to decide.
Evas GL was only able to get a pointer to the display
if a context was current.
The display pointer should be infered from Evas_GL unless
we can find a current display. EGL does not require a
context to be current in most of these function calls.
This should bring evasgl a little bit closer to EGL in terms
of behaviour (those are EGL-only extensions, btw).
Thanks @spacegrapher for the quick review
@fix
If the TLS variable was not initialized, Evas GL can't get a pointer
to a valid EGLDisplay which is required by eglImageDestroy.
So, we keep track of the dpy used at creation time and use that
if we're in another thread.
Summary:
When default framebuffer(0) is bound, attachment should contain
COLOR, DEPTH or STENCIL for glDiscardFramebufferEXT.
When a framebuffer object is bound, attachment should contain
COLOR_ATTACHMENT0, DEPTH_ATTACHMENT or STENCIL_ATTACHMENT.
This should be correctly taken into account for indirect rendering,
where internal FBO is used.
@fix
Summary:
Separate EGL extensions from GL/GLES extension list, since
we have extension list for each GL version, and we do not want to
check EGL extensions differently when different GL versions are used.
This also simplifies extension string get function as we just need to
concatenate EGL and GL extensions rathan than keeping track of
GL extensions only.
Summary:
Now we can support EVAS_GL_GLES_1_X version for GLX backend
with both direct and indirect rendering.
Refactored api get functions to have similar code path for each version.
@feature
Test Plan: Evas GL test case
Reviewers: cedric, jpeg
Subscribers: cedric, mer.kim, mythri, wonsik
Differential Revision: https://phab.enlightenment.org/D2342
Summary:
Remove gles1 prefixes for functions that are also used by gles3.
Refactor evgl_make_current a little bit.
Destroy indirect context properly.
Some log message changes and typo fixes.
Test Plan: Local tests on desktop PC
Reviewers: jpeg
Subscribers: mythri, mer.kim, wonsik, cedric
Differential Revision: https://phab.enlightenment.org/D2104
Summary:
This should enable applications to use GLES 3.0 through evas gl.
Todo: Fix indirect rendering issue occuring because texture objects
cannot be shared between different version of GLES contexts.
Todo: extension pointers need to be updated for GLES 3.0
Reviewers: wonsik, spacegrapher, jpeg
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2017
@feature
The usage of strcat/strncat was not safe, and even Coverity reported
about it.
Fixes CID 1256197:
CID 1256197 (#1 of 2): Buffer not null terminated (BUFFER_SIZE_WARNING)
1. buffer_size_warning: Calling strncpy with a maximum size argument
of 10240 bytes on destination array _gl_ext_string of size 10240 bytes
might leave the destination string unterminated.
Summary:
To distinguish supported extension name from not supported.
This patch can be solution to the problem, glGetString() returns non-supported extention name.
Test Plan: Local tests
Reviewers: raster, jpeg, Hermet, cedric
Subscribers: cedric, spacegrapher, wonsik
Differential Revision: https://phab.enlightenment.org/D1981
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Summary:
Fix 1- If extension is not listed in GL_EXTENSIONS, do not try
to get the function address of the extension functions.
Fix 2- For GL_EXT_robustness, for GLESv1 version, do not try to
export glGetnUniformXXX functions.
Reviewers: jpeg
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1965
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Summary:
Extension function pointer initialisation requires glGetString(GL_EXTENSIONS).
To get GLESv1 extension string, GLESv1 context has to be bound.
Change involves updating extensions after GLESv1 context has been bound.
Reviewers: jpeg
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1946
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
We should use GLESv1 functions in a GLESv1 context to scan for
GLESv1 extensions. Makes sense yeah?
This should expose the proper list... especially enabling FBO
extension when it's supported by the driver.
Fixes Coverity reports:
- CID 1256183
Coverity was a bit stupid there. It knows the size of both
strings and complained about unsafe strcpy. It should have
complained about unsafe strcat instead.
OpenGL 1.2 already supports some of the features that
GLESv2 has as extensions:
- GL_EXT_read_format_bgra
- GL_EXT_texture_format_BGRA8888
- GL_EXT_texture_type_2_10_10_10_REV
Also, we need to check the proper ARB name of some extensions when
running on desktop, instead of their OES/IMG/EXT equivalent:
- GL_ARB_texture_float
- GL_ARB_texture_half_float
- GL_ARB_texture_non_power_of_two
- GL_ARB_half_float_vertex
- GL_EXT_packed_depth_stencil
The extension name is GL_ARB_texture_non_power_of_two
for desktop GL, but GL_OES_texture_npot for GLES.
We will consider the extensions compatible, I believe
the GLES version is a subset of the desktop one. Not sure
if that's 100% true.
- glGetString(GL_VERSION) should not return "OpenGL ES 3.0" because
GLESv3 is not supported yet.
- GL_EXTENSIONS should return only the list of supported extensions
--> disabled for now as the whitelist of safe extensions is way
too small.
This will mark some extension functions as "safe", which means
we don't need to wrap them in order to expose them.
All the known extensions from Evas_GL_API have been marked as safe
for now.
In the future, we may encounter extensions that are not safe
out of the box, but can be wrapped. At that time, we will have
to mark them as safe but return the pointer to the wrapper instead.
Until then, only whitelisted extensions will be supported.
@feature
The idea is that normal opengl applications might very well want to
check for an extension using the usual string and not have to do
something special just because they're using evas_gl and not egl.
This should add support for the following EGL extensions:
- EGL_KHR_fence_sync
- EGL_KHR_reusable_sync (eglSignalSyncKHR)
- EGL_KHR_wait_sync (eglWaitSyncKHR)
@feature
evas gl CreateImage function was assuming the current context
should be used to create an image, while the equivalent EGL function
specifically requires the context to be specified.
This also imports some definitions for CreateImage.
And fixes typo in glEGLImageTargetRenderbufferStorageOES.
This adds new functions in Evas_GL_API struct. The version
number will be bumped to 2 in a later commit.
@feature
In evas_gl_api_ext_def.h there're calls such as:
_EVASGL_EXT_DRVNAME(EGL_KHR_image_base)
The macro is defined in evas_gl_api_ext.c as:
(strstr(glexts, #name) != NULL || strstr(glueexts, #name) != NULL)
if (_EVASGL_EXT_CHECK_SUPPORT(name)) *ext_support = 1;
But EGL_KHR_image_base is itself a macro, which is defined
in EGL/eglext.h like this:
Thus, the _EVASGL_EXT_CHECK_SUPPORT macro will unwrap into:
(strstr(glexts, "1") != NULL || strstr(glueexts, "1") != NULL)
instead of intended:
(strstr(glexts, "EGL_KHR_image_base") != NULL ||
strstr(glueexts, "EGL_KHR_image_base") != NULL)
This patch fixes this by applying stringification earlier in
_EVASGL_EXT_DRVNAME
Bugfix reported by jinhyung.jo@samsung.com
Evas engine is created per window but evas_gl engine was not properly
updating the engine info for new windows that are created. So, addressed
the design issue by passing engine_data to evas_gl engine apis..
direct rendering and then another image object using Native
Surface rendering, there was a potential for it to fall into
the same direct rendering path.
Also, fixed some minor Evas GL extension bugs that came from refactoring.
SVN revision: 79532
I've tested make -j 3 install and it works nicely
I've tested expedite with software and opengl xlib,
and it works. Not tested other engines, so please
report any problems (engines or other) on the ML.
TODO: examples and tests, I'll add them later
ISSUE: Eina_Unicode size check. It indirectly depends on
eina_config.h, which is created at the end of the
configure script. So its size is always 0. I don't
know how that size is used, so I can't do a lot,
for now.
SVN revision: 78895