Commit Graph

160 Commits

Author SHA1 Message Date
Jean-Philippe Andre 80fe4b1673 Evas GL common: Add shader ID as debug info in the pipe
Simplifies code readability a bit and helps for debugging (with GDB).
2015-01-14 16:37:06 +09:00
Jean-Philippe Andre 1874ea9890 Evas masking: Fix evas map masking in GL
While this may look like a feature, it's definitely a fix.
2015-01-14 16:35:20 +09:00
Jean-Philippe Andre bb923d5586 Evas masking: Minor fixes in GL masking 2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 44387b60a3 Evas masking: Add rectangle masking for GL 2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 2bd5cf6e6f Evas masking: Use new texm sampler instead of texa
texa should be used only for RGB+A whereas texm should
be used for masking. This should fix RGB+A masking, too.
2015-01-07 15:06:03 +09:00
Jean-Philippe Andre a2604956f9 Evas masking: Add support for BGRA/ARGB masking
Also, refactor font & image GL masking.
2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 1fac1dcf57 Evas masking: Font masking for GL 2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 124ab102b7 Evas masking: Implement image masking for GL engines 2015-01-07 15:06:02 +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
Jean-Philippe Andre e18886a2a3 Evas GL: Fix list of shaders to distribute
Some shader files (shd) were not included in EXTRA_DIST. This didn't break
the build because the .x file was correctly generated.
I guess the missing files in previous releases also had no impact because
the .h files would be generated and shipped.

Also generate the enum automagically. New shaders need to be added
to Makefile_Evas.am.
2014-11-14 10:01:30 +09:00
Jean-Philippe Andre 28a76266c6 Evas GL: Fix runtime linking issues
There is some mess with gl common functions that need to be
called from the engine itself, eg. error set/get.
2014-10-20 12:16:07 +09:00
ChunEon Park 026e767b86 evas: support anti-alias for gl line drawing. 2014-10-08 15:47:58 +09:00
Cedric Bail dde9a1e977 evas: allocate enougth atlas for all supported format. 2014-08-16 15:15:07 +02:00
Cedric BAIL 9a9d78dfcb evas: provide GetProcAddress by the engine. 2014-07-25 20:24:28 +02:00
Cedric BAIL 0d00b476cb evas: export symbol from gl_common so that loading gl_generic can expose them. 2014-07-11 15:32:51 +02:00
Jean-Philippe Andre 24f38eaf6d Evas gl: Replace all remaining references to mask stuff by alpha
Masking is not used (there even was a recent commit by Hermet to
remove most of the occurences of mask shaders in GL), and I've
introduced a new ETC1+Alpha feature. Replace the old texm and
associated variables by texa for alpha texures.
2014-07-11 12:20:07 +09:00
Jean-Philippe Andre ec9ffd0ae8 Evas gl: Fix invalid number of atlasses
Left-over from a local experiment where ETC1+Alpha had its own
texture pool. Not required.
2014-07-09 12:39:18 +09:00
Jean-Philippe Andre 48bcf182b4 Evas gl: Add support for ETC1+Alpha textures
Compile-in the required shaders, add support for the
new EVAS_COLORSPACE_ETC1_ALPHA, and upload textures as RGB+A
pairs.

@feature
2014-07-09 09:04:55 +09:00
ChunEon Park b3d11fae4c evas/gl - removed MASK ramains. 2014-07-07 17:08:22 +09:00
Jean-Philippe Andre b0df307927 Evas gl: Add support for S3TC textures
Add support for DXT1, DXT3 and DXT5 textures (4 formats in total).

@feature Add support for S3TC textures if the GPU supports them
2014-07-03 15:36:22 +09:00
Jean-Philippe Andre 644de1f93f Evas gl: Remove hack around CompressedTexImage2D
A compressed texture should be created with glCompressedTexImage2D
only, and not with glTexImage2D (This returns GL_INVALID_VALUE).
2014-07-03 11:37:48 +09:00
Rajeev Ranjan bd65b5db5d evas: improvement of Eina Rectangle Pool and integration with Evas GL backend.
Summary:
This patch introduce various new logic for packing/unpacking of Eina Rectangle in a pool.
It is then used by Evas GL backend texture allocation to improve how efficiently we pack
image in texture atlas. This lead to improved memory usage and reduced power consumption
with usually a more stable higher FPS (as it use less texture to do the same task, their
is less texture switch, so saving memory and speed at the same time).

This patch was developped on Cedric's suggestions to optimize the packing logic using Skyline
algorithm. This patch is based on master and is a new submission for earlier phab link
https://phab.enlightenment.org/D774.

Signed-off-by: Sanjay Nirankari <sanjay.n1@samsung.com>
Signed-off-by: Rajeev Ranjan <rajeev.r@samsung.com>
Signed-off-by: Sreedeep Moulik <sreedeep.m@samsung.com>

Reviewers: cedric, raster

CC: wonsik, jpeg, sreedeep.m, sanjay, govi

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-19 16:48:45 +02:00
Jean-Philippe Andre a691b2ebf9 Evas gl: Fix ETC2 texture atlasses
ETC2 textures were allocated using the same empty slots pool
as RGBA textures.

ETC1 texture atlasses should still be tested.
An extension string is required to avoid using the bad
fallback in place right now. But there is no such thing yet.
2014-06-16 20:11:41 +09:00
Jean-Philippe Andre dbd576b858 Evas gl: Enable texture atlasses with ETC1/2
We prefer ETC2 textures when ETC2 support has been detected.
According to the spec, glCompressedTexSubImage2D should work
for ETC2.

Try even with ETC1. This may fail at runtime. The fallback path
is very dubious right now but without a proper test case I'm
not sure which approach to take.

We can also imagine cases where the GPU supports TexSubImage for
ETC1 but ETC2 is not supported at all. This will need testing, as
this case is not handled.

@feature
2014-06-12 14:47:16 +09:00
Jean-Philippe Andre 90985d2282 Evas gl: Remove dlsym of glCompressedTexImage2D
The function was used directly in evas_gl_texture.c
It must be part of OpenGL core functions (since GLES 1.1
and OpenGL 2 I think).
2014-06-12 14:47:16 +09:00
Dongyeon Kim acc95afbd8 evas gl: distinguish between IMG and EXT MSAA extensions
Summary:
For drivers that support IMG_multisampled_render_to_texture,
GL_MAX_SAMPLES_IMG should be used to query max supported samples
Likewise, for drivers that support EXT_multisampled_render_to_texture,
GL_MAX_SAMPLES_EXT should be used to query max supported samples

@fix

Reviewers: seoz, Hermet, raster, cedric

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D948
2014-06-10 19:20:17 +09:00
Cedric Bail a4fd5ac3dd evas: fix broken build with OpenGL ES backend.
This is a temporary fix, once we move to Evas_GL_Image, it shouldn't
be needed anymore. Thanks to Cédric "chep" Chépied for reporting the
issue.
2014-04-25 16:46:46 +02:00
Jean-Philippe Andre 86ce491a86 Evas gl_x11: Add ETC2 support to the GL/X11 engine
This should allow texture upload with ETC2 RGB8 or RGBA8 formats.
Untested for now...

@feature
2014-04-25 16:50:29 +09:00
Taekyun Kim 8fda631730 Evas: 3D: Introducing 3D scene rendering features
Enable 3D features using --enable-evas-3d=yes when configuring.
APIs are exposed through Evas_3D.h.
Currently, evas-3d is being supported only on gl_x11 engine.

Conflicts:

	src/lib/evas/Evas_Eo.h
2014-04-25 16:15:41 +09:00
Jean-Philippe Andre 54fb9b2346 Evas: Use Evas_Colorspace to declare cspace
Why use int when we have a proper type?
All these APIs are internal.
2014-04-15 18:50:37 +09:00
Cedric BAIL 854dd14474 evas: add ETC1 texture format support to Evas. 2014-04-01 22:00:54 +09:00
Cedric BAIL d1581f8ca9 evas: support uploading AGRY88 and GRY8 directly to GPU. 2014-04-01 22:00:15 +09:00
Cedric BAIL 3684b749be evas: add support for GL_LUMINANCE_ALPHA and GL_LUMINANCE when loading image from disk. 2014-04-01 22:00:15 +09:00
Jean-Philippe Andre 7ad4a269e0 Evas gl_x11: Fix usage of glReadPixels
It is not necessary to dynamically link to glReadPixels since
this is not an extension. This code wouldn't even work on some
devices.

Also, the pixels returned are not premultiplied (yeah >_<)

And some devices (EGL) don't support GL_BGRA... so glReadPixels
would just fail and not fill in the pixels. Conversion is required.
2014-03-13 17:04:42 +09:00
Jean-Philippe Andre 59f5216391 Evas gl_x11: Add support for glReadPixels
This will be needed by the filters for proxy rendering,
for textures and maps (displacement).

Add new engine functions to unleash the (sluggish) power of glReadPixels.
The idea is to be able to bypass glReadPixels later, so 3 new APIs are
added:
- surface_lock
- surface_read_pixels
- surface_unlock
They must be called in that order.

Note (for history):
glReadPixels was always getting the wrong data during first draw,
but the right data during a redraw...
Why? Well simply because for OpenGL itself, the image had never
been drawn in teh first place! Only the Evas GL context knew
about the image drawing, as it was queued somewhere in the pipe.

One line solution: Call evas_gl_common_context_flush before
doing anything else.
2014-03-07 11:07:09 +09:00
Sung W. Park 2b4a7b438d evas gl: added partial rendering support for qcom extension
When running in direct rendering mode, properly support partial
rendering if the extension is properly supported.

Also, fixed the SwapBufferwWithDamage rectangle coordinate bug.
It wasn't properly y-inverted before.
2014-02-15 02:33:47 +09:00
Carsten Haitzler 93fd2263fc evas gl - fix egl/gles build after alpha4 change for fonts 2014-01-13 07:02:24 +09:00
Carsten Haitzler acf7dfa579 evas - gl engine - glerr should be off by default for performance
stable release - cherry-pick me!
2013-12-27 17:32:15 +09:00
Cedric Bail 403098fdb2 evas: add missing define for some target. 2013-11-27 13:51:40 +09:00
Carsten Haitzler 7d7f548afc evas - gl - dont allocate image and/or texture until needed on native unset 2013-10-16 22:56:38 +09:00
Sung W. Park 3074280217 Evas: adding image dump debug feature for gl_x11 backend
Added a feature to dump out a png image before calling SwapBuffers.
To turn on the feature, use the following env vars.

EVAS_GL_SWAP_BUFFER_DEBUG_DIR="dir_name" sets the name of the directory
that the files will be output to and enables the debug mode.

EVAS_GL_SWAP_BUFFER_DEBUG_ALWAYS=1 will enable the writing of the
files every frame.  This in effect turns on the swap_buffer_debug
variable, which can be set on or off in gdb for debugging.  This will
allow dumping of certain frames without having to dump out a ton of
files to track down one frame.
2013-07-23 10:27:28 +09:00
Carsten Haitzler 199fb6523e evas gl engine - paranoia: check max texture size limits on texture alloc 2013-07-11 12:39:44 +09:00
Cedric Bail d06a0982ef evas: add support for asynchronously uploading GL texture.
NOTE: when using Evas_Object image preload infrastructure the GL texture
upload was uploaded from the main loop during the rendering stage. This
could lead to some frame drop during fast animation due to the time needed
to upload that texture.

This patch fix this problem by uploading a small texture quickly (16x16)
and waiting for going back to the main loop to be able to use the same GL
context from another thread to do the texture upload asynchronously without
blocking the main loop.
2013-06-24 12:04:18 +09:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Cedric Bail 1403b3a9ad evas: preliminary work on texture destruction for async preload of texture. 2013-06-14 16:38:18 +09:00
Cedric Bail ab9c734b7f evas: cleanup GL texture allocation with some code refactoring. 2013-06-14 16:38:18 +09:00
Carsten Haitzler fdabe06989 evas - partial rendering support now for qualcomm extn too. 2013-06-11 18:12:07 +09:00
Cedric Bail d833244100 evas: add infrastructure to open from Eina_File. 2013-05-08 18:17:00 +09:00
Cedric Bail c3f9d3b8b8 evas: Make Evas_Loader API public. 2013-05-08 18:16:59 +09:00
Carsten Haitzler 1a81f0a8c2 force scissor to always be on indicating partial gl update region so
gpu can.. do more sensible things.
2013-05-03 19:31:28 +09:00
Carsten Haitzler 9ec8064638 Work around new intel Mesa/xorg bug where alpha
channel in NON-ARGB windows is not filled in with 0xff
even if all the code does things right.
2013-04-14 01:14:58 +09:00
Sung W. Park 34ce73badd [Evas] Updated eglMap/UnmapImageSEC extension definition
Recently Samsung specific eglMap/UnmapImageSEC has been updated to
support new features.  The extension definition was updated in evas
accordingly.
2013-04-12 17:34:13 +09:00
Carsten Haitzler deabd07e4b oops - define GL_UNPACK_ROW_LENGTH not GL_UNPACK_ROW_LENGTH_EXT 2013-03-22 11:35:05 +09:00
Carsten Haitzler 797c1a1283 seems tegra has gotten better so up pipe max number in gl engine. 2013-03-17 14:18:52 +09:00
Carsten Haitzler 3728c60311 Fix opengl-es 2.0 engine support to only use GL_UNPACK_ROW_LENGTH
if the correct gles extension exists.
2013-03-15 13:05:39 +09:00
Carsten Haitzler 683e5d7d08 Fix evas GL common engine to have a shader to do oversampling on
downscaling. This makes quality much better and "at best"
equates to a 16 point sample (2x2 linear interpolation samples,
where a linear interpolation sample equates to a 2x2 sample).
This will have perfomance impact, but the quality is worth it and
makes it closer to software downscaling in quality. It supports
2x2, 2x1 and 1x2 oversampling. YUV not done, nor image mask
(font shaders not needed).
2013-02-26 22:07:30 +09:00
Carsten Haitzler 4452fad7a3 fix up apparent problem with egl context and sizing/rotation... need
to test more though.



SVN revision: 83878
2013-02-14 03:27:23 +00:00
Sung Park edcb4cf295 Pulled out evas gl backend binary shader file caching code from
evas_gl_shader.c file and made an internal generic caching api in 
evas_gl_common.h for use in other places ie. evas_gl.

Then implemented evas_gl surface cap. caching code in gl backend to
accelerate the engine creation. 



SVN revision: 82321
2013-01-07 06:16:18 +00:00
Gustavo Sverzut Barbieri 545057d0b1 efl/evas/filters: say goodbye.
This task wasn't completed and it was all disabled in code, then
remove it so it doesn't add cruft to be looked at.



SVN revision: 80240
2012-12-05 13:03:51 +00:00
Vincent Torri c15e9c6575 merge: and now Evas
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
2012-11-04 11:51:42 +00:00