Commit Graph

963 Commits

Author SHA1 Message Date
Bogdan Devichev 043055fc8e evas: preparation of places for model_saver_loader separated from image_saver_loader. 2014-12-23 21:13:43 +01:00
Jean-Philippe Andre af43bc67e4 Evas GL: Try harder to find a matching config for GLESv1
If MSAA was requested, it is very likely that no config was
found (depending on the driver), so we'll try again without
MSAA. Yeah, this might not look very smooth but it should be
better that failing at eglMakeCurrent.
2014-12-22 22:15:12 +09:00
kabeer khan 48920920a5 evas: fix memory leak in evas_swapper.
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

@fix

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1800

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-22 12:06:16 +01:00
Jean-Philippe Andre 8f6b34d4cc Evas GL: Fix list of GLES 1.1 extensions
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.
2014-12-19 18:14:25 +09:00
Jean-Philippe Andre 3572b3bf3d Evas GL: Add a warning in gl_x11 about MSAA & RGBA for GLES1
We've discovered some bugs on some drivers related to
MSAA and RGBA blending. Dunno yet if the same problem can affect
GLES2 as well.
2014-12-19 18:14:25 +09:00
Jaehyun Cho c8a993d1f7 evas - generic loaders - fix possible string overflow on decoders
Summary:
fix possible string overflow on decoders.
         this commit is based on commit 3c5412f728
         that fixes CID 1039580.

Reviewers: raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1783
2014-12-17 17:49:07 +09:00
kabeer khan 256761bf2f evas/tgv: Added DSSIM metric in evas_image_save_tgv
Summary:
Resolved TODO to add DSSIM metric in DEBUG_STATS

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric

Subscribers: devilhorns, cedric

Differential Revision: https://phab.enlightenment.org/D1773
2014-12-17 16:40:59 +09:00
Chris Michael 251c300b8f evas-gl-common: Fix issue with Coverity reporting null dereferences
Summary: This fixes Coverity CID1257606 and CID1257607: Dereferencing
null return value. _evgl_tls_resource_get Can return NULL so we should
be checking that returned value before trying to use it

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 13:30:51 -05:00
Stefan Schmidt 4d2373e03d modules/tgv: Switch from obsolete LZ4_uncompress function to LZ4_decompress_fast
The function is declared as obsolete and in some newer headers it is no
longer defined. The new function is the same besides the name change.
2014-12-10 14:52:58 +01:00
Jean-Philippe Andre 4cf2d75715 Evas GL: Fix direct rendering with client-side rotation
There was a problem when checking whether the current surface
is compatible with direct rendering. In case of client-side
rotation (it's a flag set on the surface by the app), a surface
can be directly rendered even if the rotation is not 0.

But, before this patch, it was assumed that the surface was
current. Which doesn't make sense because make_current is
called by the pixel callback, from the application, and this
happens *after* we check for direct rendering.

As a consequence, it was not possible to mix directly rendered
surfaces with FBO-based ones, and use client-side rotation.

This patch should solve that issue.
2014-12-10 10:52:22 +09:00
kabeer khan 25db7de813 evas_xcb_outbuf: fix memory leak
Summary: This fixes a leak in the xcb engine where the Outbuf_Region
was not being freed.

@fix

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1750
2014-12-09 09:23:12 -05:00
Jean-Philippe Andre e4a11c008c Evas GL: Fix scissors with direct rendering
If an app calls glDisable(SCISSORS) and uses direct rendering,
then the DR scissors were dropped and so glClear would erase
the contents of the entire canvas, instead of being restricted
to the image object.
2014-12-09 18:38:08 +09:00
Jean-Philippe Andre 2a69980959 Evas GL: Fix current FBO after make_current(0, 0)
Example scenario:
- Create a direct rendered Evas GL 'sfc' 'ctx'
- Create a PBuffer dummy surface, make it current
- Do some stuff
- Make current (NULL, NULL) to go back to no target
- Make current (sfc, ctx)
--> glClear() will not render anything on screen

Reason:
The current FBO binding is still set to the implicit FBO
bound to the PBuffer surface (it could be any surface, really).
2014-12-09 18:38:08 +09:00
Gwanglim Lee 353a533ff5 evas/gl_drm: Fix warning
Using int instead of uint32_t.
2014-12-08 19:07:27 +09:00
Mun, Gwan-gyeong d1b8d52e0e evas/gl_drm: add native surface for wayland_egl_client.
Reviewers: zmike, devilhorns, cedric, gwanglim

Reviewed By: cedric, gwanglim

Subscribers: jpeg, torori, cedric

Differential Revision: https://phab.enlightenment.org/D1507
2014-12-04 17:59:30 +09:00
Carsten Haitzler 83512198b8 evas - gif loader - fix technically "wrong" sizeof (doesnt cause a bug)
go from sizeof(char **) to sizeof(char *) ... effectively. so no real bug.
2014-12-04 16:03:32 +09:00
Dmytro Dadyka 720a3726e9 Evas: Evas_3D - Add check of visibilty node.
If the node is not visible, it is not rendered, which improves performance.
@feature.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1722

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-03 09:58:02 +01:00
perepelits.m b1f8f3fb17 evas: Evas_3D - fix typo.
Summary:
A little fix of copy-paste, there were problems while changing texture coordinates of indices.

@fix

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1725

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-03 09:58:02 +01:00
Jean-Philippe Andre 0514cbc1a3 Evas GL: Add preventive padding after Evas_GL_API
Since this struct is likely to grow in size over time, client apps
built against future versions of EFL might start indexing fields
that are not present in the current form.

Also, don't reset the struct memory as this would break
multithreaded GL applications.

While this is not exactly a fix, I'll backport this.

@fix
2014-12-03 16:57:49 +09:00
MinJeong Kim ad0f10950c evas-gl-drm: remove initalizing gbm on engine setup
Summary: Removed evas_drm_gbm_init() on the initial setup of evas gl_drm engine.

Reviewers: gwanglim

Reviewed By: gwanglim

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1728
2014-12-03 16:30:13 +09:00
Gwanglim Lee 9eefb3ea89 Evas GL: Add support for bind_wayland_display extension
This provides EGL_WL_bind_wayland_display EGL extension to bind
and unbind the wl_display of a wayland server to an EGLDisplay.

@feature
2014-12-02 22:45:36 +09:00
Chris Michael c1eb5de916 evas-gl: Fix evas-gl to compile for EGL
Summary: Evas compilation was broken for --with-opengl=es due to the
use of GL_R16 (which is not defined for EGL).

NB: This may Not be the Proper fix, but at least it compiles now.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 10:31:47 -05:00
Chris Michael 077261689d evas-gl: Fix improper #ifdef check
Summary: We should be using #ifdef here, not #if

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 10:29:53 -05:00
Dmytro Dadyka 6762af0beb evas: Evas_3D - add mesh blending mode.
Reviewers: Hermet, raster, cedric

Subscribers: Oleksander, cedric

@feature

Differential Revision: https://phab.enlightenment.org/D1548

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-01 08:09:29 +01:00
Dmytro Dadyka 4366057dc6 evas: Evas_3D - fix depth texture size.
Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

The texture used to store the depth map should be a single-channel texture.

@fix

Differential Revision: https://phab.enlightenment.org/D1713

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-01 05:57:05 +01:00
Carsten Haitzler 8fcfae57d1 evas - gl - fix warning for unused var in glx build 2014-11-29 12:07:33 +09:00
Jean-Philippe Andre 151eeacec8 Evas GL: Use strncat and strncpy for safety
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.
2014-11-28 16:26:49 +09:00
Jean-Philippe Andre 07c68ac42b Evas: Fix shader gen script for Ubuntu
dash was the shell on that machine.
Also, GCC complained about a non const initializer.

Thanks SeoZ for the report.
2014-11-27 21:47:02 +09:00
Jean-Philippe Andre 02d123be77 Evas GL: Fix up some more desktop GL extensions
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
2014-11-27 21:07:24 +09:00
Jean-Philippe Andre 45374e2536 Evas GL: Also add read bgra for desktop GL 2014-11-27 20:50:47 +09:00
Jean-Philippe Andre 9be96f4b96 Evas GL: Advertise support for npot on desktop
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.
2014-11-27 20:50:47 +09:00
Jean-Philippe Andre eaefb7c047 Evas GL: Always support BGRA8888 on desktop GL 2014-11-27 20:50:47 +09:00
Jean-Philippe Andre d8a4792612 Evas GL: Also return fake GLSL version string 2014-11-27 20:50:47 +09:00
Jean-Philippe Andre 9f38aadd38 Evas GL: Always return "OpenGL ES 2.0" as version
This time it's for desktop GL.

I decided to keep some vendor info, as it can help for debugging
purposes.
2014-11-27 20:50:47 +09:00
Jean-Philippe Andre 6d652589ad Evas GL: Print GLSL version with EVAS_GL_INFO 2014-11-27 20:50:40 +09:00
Jean-Philippe Andre af1b679e6c Evas GL: Return supported extensions list in glGetString() 2014-11-27 18:36:29 +09:00
Jean-Philippe Andre 129ba38cc7 Evas GL: Return current framebuffer based on ctx information
ctx->current_fbo should contain the visible FBO value, even
if indirect rendering is used.
2014-11-27 16:46:31 +09:00
Jean-Philippe Andre e2a6f5129c Evas GL: Remove useless field
- fbo_attached is not used.
- buffers_allocated is just a bool
2014-11-27 16:46:31 +09:00
Jean-Philippe ANDRE 85b0992657 Evas GL: Remove unnecessary check
We already checked that re->func.get_pixels wasn't NULL.
2014-11-27 00:46:47 +09:00
Jean-Philippe Andre 8771c78a90 Evas GL: Fix indirect rendering surfaces for GLES 1.1
Carefully select the requested EGL config and match it with
the available visual from X, including the following options:
- Stencil
- Depth
- MSAA

TODO: The same thing for GLX. And fix direct rendering as well.
2014-11-26 22:56:06 +09:00
ChunEon Park 215b52ecc1 evas/map : set antialias context for map rendering. 2014-11-26 12:22:55 +09:00
Jean-Philippe Andre f6e73c7903 Evas GL common: Cosmetic change
Don't cast "ext" a hundred times when you can do it once.
2014-11-24 18:52:14 +09:00
Jean-Philippe Andre 2e83b076db Evas GL common: Scan extension string for ETC1 subimage
There is an official name for it:
GL_EXT_compressed_ETC1_RGB8_sub_texture

Thanks Mythri for pushing that specification.
2014-11-24 18:52:14 +09:00
Jean-Philippe Andre 09934be788 Evas GL common: Fix RGB+A textures draw
Also rename texm into texa for consistency.
Even though texa might be a mask image, it's still used only
for it's a (alpha) channel.
2014-11-24 18:52:14 +09:00
Jean-Philippe Andre f902de616e Evas: Check load_error before loading again (GL)
This is a new attempt at avoiding reload of an image
that failed to load during async preload.

See 42d2f8a12b (reverted).

I still can't figure out why setting load_error does not
work as expected (E pager becomes blank).
2014-11-19 19:47:33 +09:00
Jean-Philippe Andre 64238ca9f1 Revert "Evas: Set image load_error after load"
Oops, I didn't test this enough.
This causes some problems with E's pager for instance.

This reverts commit 42d2f8a12b.
2014-11-19 19:19:56 +09:00
Jean-Philippe Andre 42d2f8a12b Evas: Set image load_error after load
In case of async preload, this avoids loading an image twice
if it already failed loading.

Thanks Minkyoung Kim for spotting this.
2014-11-19 19:07:19 +09:00
Jean-Philippe Andre 9afe5ffb9d Evas: Cosmetic changes in evas_gl_image 2014-11-19 18:54:36 +09:00
Jean-Philippe Andre 54afef04c2 Evas GL: Change comment and DBG message 2014-11-19 16:22:37 +09:00
Jean-Philippe Andre 1a403849dc Evas GL: Wrap glGetString for VERSION
- 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.
2014-11-19 16:22:37 +09:00