Commit Graph

658 Commits

Author SHA1 Message Date
Carsten Haitzler a97f5d7bb8 evas gl common - fix possible negative array accesses if search format fails
this should fix CID 1223506, 1223505, 1223504
2014-08-12 17:32:04 +09:00
Carsten Haitzler 8845ecb2b2 evas gl common - fix potential invalid access during texture free
this should address CID 1223507
2014-08-12 17:25:15 +09:00
Gwanglim Lee 55715ccf05 evas-wayland-egl: Add missing free
Summary:
Add free to eng_gl_context_free
@fix

Test Plan: N/A

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1315
2014-08-11 11:47:25 -04:00
Gwanglim Lee d4c76753c9 evas-wayland-egl: Fix typos about egl context attribute list
Summary:
Fix typos 3 to 2.
@fix

Test Plan: N/A

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1314
2014-08-11 11:45:30 -04:00
Chris Michael 3311729f3c wayland-egl: Fix Outbuf structure not having evas & engine info
gl_generic functions expect the Outbuf to contain the canvas, so we
fixed the eng_window_new function to accept that, And the engine info.
This simplifies the calls to eng_window_new.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-11 11:29:33 -04:00
Chris Michael 7c6b9637d9 wayland-egl: Fix calls to eng_window_new
Since we simplified the eng_window_new function to accept the canvas
and engine info, we need to update calls to that function

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-11 11:28:50 -04:00
Chris Michael 54e913a025 wayland-egl: Fix eng_window_new function prototype
We need to pass in the canvas and engine info structure as the
gl_generic engine needs the outbuf->canvas to be set.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-11 11:28:04 -04:00
Gwanglim Lee 110b0108ad evas-wayland-egl: Fix evas wayland_egl engine crash on mesa driver
Summary:
Evas wayland_egl engine crashes on startup when it is running with mesa.
Evas is trying to get EGL / GLES extension function addresses where evas_gl_symbols.
It is called before eglGetDisplay. Then mesa considers that current egl platform is
X11 if it has no EGL_PLATFORM env var. This behavior of mesa is bad. But we should
provide workaround until it is fixed. Thus EGL_PLATFORM env var should be defined to
wayland before calling eglGetProcAddress.
@fix

Test Plan: run elementary_test under wayland with wayland_egl engine.

Reviewers: raster, stefan_schmidt, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1312
2014-08-11 11:08:09 -04:00
Chris Michael 97adf8a316 evas-wayland-egl: Fix evas wayland_egl engine not loading due to missing symbol
Seems the newer wayland-egl code was missing the log domain variable
and thus would not load at time of dlsym due to missing symbol. This
fixes that problem by defining the variable.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-10 15:54:35 -04:00
Stefan Schmidt 9283575490 evas/gl_common: Use the right list when removing aptt
Another classical copy and paste error. All references but one replaced.

CID: 1223502
2014-08-08 14:54:56 +02:00
Carsten Haitzler 01cd90b6c3 evas gl - glx - sety current to NULL on free of window or context
hunting a mem leak i found we dont nuke the current context when
freeing it or the window bound to the current context. fix this.
2014-08-07 19:39:16 +09:00
Carsten Haitzler f5cff9490e evas gl - did not free all atlas formats - fix
we have expanded atlas formats long since - so use #define to free
correct amount instead of 6
2014-08-07 18:25:20 +09:00
Carsten Haitzler 8b796edce7 evas gl - fixz minor leak on exit of rectangles
these were static rect cutouts, so they stayed around on exit and thus
we "lost" them. this nukes them on context free and each new frame.
fixes the "leak"
2014-08-07 18:15:50 +09:00
Chris Michael 827ca3fcfc evas-wayland-egl: Implement eng_gl_context functions
The eng_gl_context functions are used for Evas 3D, so let's support
those in the wayland_egl engine.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-06 15:05:35 -04:00
Chris Michael 423506a0aa evas-wayland-egl: Fix wayland egl engine to work again
Previous (french) changes to evas_gl code broke the wayland egl engine. This
batch of changes fixes that by rewriting to engine to work with new
evas_gl functions.

Fixes Phab ticket T1478

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-06 14:24:29 -04:00
Chris Michael 9419e48fb4 evas-wayland-egl: Add support for EGL_BUFFER_AGE_EXT and add external
function pointers for glsym_evas_gl functions

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-06 14:19:55 -04:00
Chris Michael e2c08ffec2 evas-wayland-egl: Add support for SWAP_MODE_QUADRUPLE and use
Eina_Bool for boolean values

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-06 14:19:15 -04:00
Chris Michael 7cf7ca213b evas-wayland-egl: Rename Evas_GL_Wl_Window to Outbuf
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-06 07:44:50 -04:00
Chris Michael 59294c7381 evas-wayland-egl: Fix includes for using GL Generic
Recent changes to evas engines require using evas_gl_generic now, so
let's sort out the headers and include the gl_generic one we need

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-06 07:44:50 -04:00
Carsten Haitzler beb7e6e611 evas - gl-x11 - extensions - be more specific about video_sync extn
this should avoid false-positive detection for this extension - other
extensions share string content
2014-07-30 21:40:16 +09:00
Chris Michael aea57d7a8e evas-wayland-shm: Free allocated rectangle after sending damages
We allocate a new eina_rectangle here, but we never free it after
sending damages to the surface.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-29 17:45:24 -04:00
Cedric BAIL 3c179cdb87 evas: move to SDL2 and use GL_Generic infrastructure. 2014-07-25 20:24:29 +02:00
Cedric BAIL 9a9d78dfcb evas: provide GetProcAddress by the engine. 2014-07-25 20:24:28 +02:00
Chris Michael 278d55bf0f evas-drm: Remove extra blank line
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-16 11:35:26 -04:00
Stefan Schmidt 18989020d7 evas/drm: Make use of ecore_drm for opening DRM device
We use this functionality already from ecore_drm. The evas version does
not even use udev to acquire the device which means we could not support
hotplugging. The only missing feature was the capability check for
DUMB_BUFFER which I added to ecore_drm now.

This is the second iteration of this patch. Thsi time also taking expedite
runs of he evas drm engine in account.
2014-07-16 08:53:43 +02:00
Cedric BAIL de2536e892 evas: remove useless declaration from GL_Generic. 2014-07-14 15:46:54 +02:00
Cedric BAIL cec904cd03 evas: make gl_x11 rely on gl_generic.
Note that we can't access gl_common directly as it is not possible to link it
2 times. I also didn't want to force evas to be linked with GL/EGL. So I rely
now on dlsym on about 20 symbols to get that backend going.
2014-07-11 15:32:51 +02:00
Cedric BAIL ac9cd35892 evas: add gl_generic backend.
This is the first step to introduce a common gl infrastructure for all gl based backend.
For now it is strictly doing the exact same thing that the gl_x11 was doing, but I already
spoted that a lot of the optimization in gl_x11 where not incorporated in other gl backend.
So this is going to help everyone by sharing more code on a crucial part of our infrastructure.
2014-07-11 15:32:51 +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
Cedric BAIL 4f18b499ac evas: check if Render_Engine was created before using it in error case. 2014-07-11 15:32:51 +02:00
ChunEon Park 7e8d43ee85 Revert "evas/gl: improve the rendering quality."
This reverts commit 5e18223f67.

Conflicts:

	src/modules/evas/engines/gl_common/evas_gl_context.c

we've got a side effect(another quality issue) of the patch. so revert it.
2014-07-11 14:50:20 +09:00
Jean-Philippe Andre 7512a54954 Evas gl: Fix upload of RGB+A textures [INCOMPLETE]
The textures have duplicated borders, take them into account.
2014-07-11 13:41:38 +09: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
Cedric BAIL 255ceb419c evas: gl_common already provide the infrastruture to manipulate ImageSEC. 2014-07-10 11:34:34 +02:00
Chris Michael d7b7f19e5e evas-engine-wayland-shm: Check for depth being INHERIT on reconfigure
Software Generic backend can send us OUTBUF_DEPTH_INHERIT during a
reconfigure. If we are inheriting the previous depth, let's check that
so we don't get needless destrouction/recreation of shm buffers.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 12:57:17 -04:00
Chris Michael d5443ffbce evas-engine-drm: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 11:39:46 -04:00
Chris Michael a20a12bfbc evas-engine-drm: Fix evas drm engine bufer depth
Seems the new software_generic backend is passing in
OUTBUF_DEPTH_INHERIT during a reconfigure, so let's add a check for
that else if not, the entire drm engine stops rendering due to output
buffers not being created to match the framebuffer depth.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 11:39:46 -04:00
Chris Michael 89d4384b14 evas-engine-drm: Fix update of output buffer size
Adjust the ob->w/h dimensions After the framebuffer has been setup
because we cannot have output buffers smaller than the framebuffer

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 11:17:21 -04:00
Chris Michael 4f8b8cd398 evas-engine-drm: Fix software_generic_update to use the correct size.
We cannot use epd->output.w/h in these calls as the setup of the
output buffer May cause a resize. Drm buffers cannot be allocated
Smaller than the framebuffer size, so evas_drm_outbuf_setup function
May resize the ob->w/h to match the framebuffer.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 11:15:39 -04:00
Cedric BAIL 8d53f4ca3b evas: correct multi buffer support. 2014-07-09 16:14:57 +02:00
Cedric BAIL 68110c63b6 evas: actually put the specific code in the right place. 2014-07-09 15:17:03 +02:00
Jean-Philippe Andre c65918eaed Evas gl: Add errors when using ETC1+Alpha as a normal texture 2014-07-09 14:01:11 +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 c7d290b447 Evas gl: Remove non-existent filters from compile.sh 2014-07-09 10:40:25 +09:00
Jean-Philippe Andre 698f7f1770 Evas gl: Don't use glCompressedTexSubImage2D for ETC1
Eeeeh. Not only we don't support atlasses with this RGB+A thing
yet, but ETC1 does not even support SubImage2D (according to the
current spec).

Also, fix a few typos in that same function.
2014-07-09 10:18:34 +09:00
Jean-Philippe Andre cb0eef29c8 Evas gl: Fix potential memleak
Fixes CID 1224765.
This CID reports a potential memleak in an "assert" situation.
2014-07-09 09:41:40 +09:00
Jean-Philippe Andre c0b7957d17 Evas gl: Simplify cspace matching for textures
Some colorspaces (ETC, S3TC, GRY, ...) don't care about the value
of BGRA support or the alpha flag. So, let's introduce the
new boolean^Wenum value MATCH_ANY ;)

Note: the compressed texture formats with alpha support have been
marked as matching both TRUE and FALSE for alpha. The images
should always have the alpha flag set to TRUE, though.
The BGRA flag really doesn't matter.
2014-07-09 09:05:37 +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
Jean-Philippe Andre 224506171f Evas gl: Add shaders for RGB+Alpha mode
These shaders take two textures as input and sample RGB from
texture 1 and alpha from texture 2. This is the non-premultiplied
version, so RGB' = RGB*A.

This includes only the GLSL code.
2014-07-09 09:04:55 +09:00
Jean-Philippe Andre 23e60bd6ff Evas gl: Fix path resolution in compile.sh
Let's make compile.sh work from anywhere (not just from its
containing directory). Also fix problem with calling make-c-str.sh
without setting PATH.
2014-07-09 09:04:55 +09:00