Commit Graph

1722 Commits

Author SHA1 Message Date
Jean-Philippe Andre c646b0ace5 Evas GL common: Properly disable texuv3 when only texuv2 is used
Yet another vertex array fix (GL crash).
2015-04-13 17:43:52 +09:00
Jean-Philippe Andre 0c7857024b Evas GL common: Enable vertex arrays only when requested
This should fix Dave's crash with the GL engine.

Indeed the pointer to the color array is passed directly
to the driver, without memcpy. Then, during glDrawArrays, the
driver will try to address it... but it could as well be NULL or
invalid. So, crashes would occur.

Also mark use_vertex as always true. We keep this field only for the
alloc() function.
2015-04-13 17:43:42 +09:00
Jean-Philippe Andre 21c91928d2 Evas GL common: Fix size of vertices data buffer
This actually has more chances of fixing Dave's GL crash.
2015-04-13 13:51:53 +09:00
Jean-Philippe Andre be45a45a26 Evas GL common: Only push color VBO for map when required
Since the new shader selection system is able to check the
value of nomul, we can avoid pushing color when they are not
required (color is opaque white).

Hopefully this will fix Dave's crash (mayyyyybe...)
2015-04-13 11:40:04 +09:00
Chris Michael 1438a980dd evas-software-x11: Fix dereference before null check(s)
Summary: This fixes Coverity CID1270028, CID1270029, CID1270030 where
variables RGBA_Image and Native where dereferencing function input
paramaters Before null checking them.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-12 21:13:18 -04:00
Chris Michael 2a7640cb4e evas-gl-x11: Fix dereference before null check
Summary: This fixes Coverity CID1293519 where einfo was being used
Before it was being null checked (which Could have caused a crash if
in fact einfo Was NULL).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-12 21:13:18 -04:00
Chris Michael 3b4902e17e evas: Fix CID1293000 (resource leak)
Summary: This fixes a resource leak of eina_array in
eng_ector_renderer_draw which would return without freeing an
allocated array.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-12 21:13:18 -04:00
Carsten Haitzler f022c23166 evas - gl common engine - dont complain on every surace opt fetch
this causes a complint every single frame - not a good idea.
2015-04-12 11:36:28 +09:00
Chris Michael 9349c44537 evas-drm: Add back in the r, g, b masks for conversion
Summary: This is a big oopsie !! Should not have been removed during
previous commit.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael e2e3e77010 evas-drm: Remove evas_drm file from build order
Summary: The Evas Drm engine makes use of Ecore_Drm functions now so
we no longer need private versions of the same code

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael dd62bb1d65 evas-drm: Make evas drm engine use new ecore_drm functions
Summary: As we already have Ecore_Drm which handles all things drm
related, let's make use of it in the Evas Drm Engine. This modifies
the 'meat' of the Evas Drm engine to use Ecore_Drm functions rather
than keeping private versions of the same code.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael 7e15e58e07 evas-drm: Cleanup drm engine code
Summary: With the evas drm engine refactor, some of the fields in the
Render_Engine structure are unused so remove them.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael 53ecea1278 evas-drm: Cleanup evas_engine header file
Summary: With the evas drm engine refactor, a lot of these fields in
the Outbuf structure are unused so remove them. This also removes
unused private function declarations.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael 745192fd19 evas-drm: Cleanup Engine Info structure
Summary: A few of these engine fields are no longer needed or were
unused in the Evas Drm engine so remove them.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael f6c5550946 ecore-evas-drm: Use new Ecore_Drm functions to get properties of the output
Summary: This makes use of the newly added Ecore_Drm API functions to
get information about the output so we can setup the Evas engine
properly

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael 6257127d0c ecore-evas-drm: Setup Ecore_Drm_Device for software rendering
Summary: If we are using the software version of ecore_evas_drm, then
make API call to setup the Ecore_Drm_Device for software rendering.
This creates the dumb buffers on the Ecore_Drm_Device.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael e7538322e9 evas-drm: Use ecore_drm_fb_dirty function to mark framebuffer as dirty
Summary: This removes an internal evas drm engine function and instead
uses the new ecore_drm_fb_dirty function call to mark the framebuffer
as dirty

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:49 +02:00
Dongyeon Kim 708c537790 Evas GL: Add missing dlopen for GLX 1.x version
Summary:
For GLX backend, we should dlopen libGL.so*
@fix

Test Plan: Evas GL 1.x test cases

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: mythri, mer.kim, wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D2322
2015-04-10 16:47:12 +09:00
Dongyeon Kim 3228c376ec Evas GL: remove direct surfaces hash
Summary:
Evas GL surface buffers are allocated at make current time now
rather than surface creation time, and since we pass evas gl surface handle
to the backend, we do not need direct surfaces hash anymore.

Test Plan: elementary test and evas gl test cases

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, mythri, mer.kim, wonsik

Differential Revision: https://phab.enlightenment.org/D2320
2015-04-10 16:47:08 +09:00
Dongyeon Kim bbc4222eaf Evas GL: reset current surface to NULL when it is destroyed
Summary:
Hopefully this will fix some of the multiple windows issues for elm glview but not all.
@fix

Test Plan: elementary glview tests

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2317
2015-04-10 16:47:01 +09:00
Oleksandr Shcherbina 364dcab234 [evas/evas_3D] Uninitialized component of vector gl_FragColor in shadow_map shader
Summary:
@fix
During execution example evas-3d-obj, part of 3D objects showed with red ripple.
The reason is not completely initialize component vector gl_FragColor

Reviewers: cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2292
2015-04-10 14:26:55 +09:00
Chris Michael d815d9bd10 evas-drm: Use Ecore_Drm_Fb for framebuffers
Summary: This commit changes the evas drm engine to use Ecore_Drm_Fb
for framebuffers. We remove the old 'Buffer' structure from the evas
engine and replace it in Outbuf with Ecore_Drm_Fb. This also removes
unused functions from the evas_drm.c file as we can now use
ecore_drm_fb calls

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:40:53 +02:00
Chris Michael e72e1e1751 evas-drm: Remove evas_bufmgr.c from the Evas Drm engine
Summary: This file is not needed for the software drm engine. This was
added (initially) for combining the drm software & hardware engines
into one. As that is not the case, this file is unused.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:40:32 +02:00
mythri.venugopal 0580f88990 Evas GL: Add missed GLES 3.0 functions in evgl_load_gles3_api.
Reviewers: wonsik, spacegrapher, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2300
2015-04-08 15:14:43 +09:00
Jean-Philippe Andre 5bdcea59db Evas gl_x11: Fix runtime switching of GL window configurations
Test case:
- Elementary Test
-- GLView
--- Direct rendering

Direct rendering would never happen in reality, because Evas GL
had to fallback. The reason being that DR requires the window
to have a depth buffer, but this depth buffer was no present
in the default config.

From elm, the solution is to set a special accel_preference,
for instance "gl:depth". But setting this value right before
calling elm_win_add() for the GLView test was already too late.
Indeed, evas_x would keep the default configurations and reuse
them no matter what was requested (ie. only RGB and RGBA would
work).

Solution:
Implement a slightly more complex cache based on a hash map instead
of just two static variables. Always request a new config if it's
not found in the current hash. Store that config, and reuse it for
the same config requests.

Tons of line changes because of the name changes and the whitespace
adjustments. Also some variables disappeared into the magic hash table.
2015-04-07 14:10:33 +09:00
Jean-Philippe Andre f419555cd8 Evas GL: Skip direct rendering check if the surface is indirect
Note: These checks are only for debugging.
2015-04-06 17:24:43 +09:00
Daekwang Ryu 29cb8aeb59 Evas GL: check EvasGL cache file version with micro version
Summary: check EvasGL cache file version with micro version

Reviewers: cedric, raster, jpeg, Sergeant_Whitespace

Reviewed By: Sergeant_Whitespace

Subscribers: Sergeant_Whitespace, cedric, wonsik, spacegrapher, mer.kim

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-04-06 16:32:49 +09:00
Bogdan Devichev f8f118f058 evas-3d: T2226 (Evas Eet saver does out of range access) fixed.
Summary:
texcoord now is 2D vector

@fix

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2233
2015-04-06 14:13:30 +09:00
Oleksandr Shcherbina e2f11bf4cb Revert "Evas 3D: Fix shadow map shader"
Summary:
This reverts commit 4af7a947a6.
There is more convenient way remove noise in vector gl_Fragcolor at shadow_map
shader, because current decision lead to useless issue with shadow effect.
Need just add default initialize at the begining in shader file smth like that
gl_FragColor = vec4(1);
I suppose do that after this patch.

Reviewers: cedric, raster, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2290
2015-04-06 10:45:42 +09:00
Cedric BAIL 39f7ce192c ector: implement surface size property. 2015-04-03 16:34:24 +02:00
Subhransu Mohanty 7d0944bda5 evas: handle mul_col for ector drawing in gl backend.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-03 16:34:21 +02:00
Subhransu Mohanty 097f46a047 evas: flush cpu pipeline before ector drawing.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-03 16:34:11 +02:00
Cedric BAIL c9aaa12c07 evas: force cpu end opt when switching to Cairo rendering. 2015-04-03 16:34:09 +02:00
Cedric BAIL de08a3bc04 ector: add reference point to define (0, 0) and don't repeat the same value everywhere. 2015-04-03 16:33:19 +02:00
Cedric BAIL 084fb9f87e evas: use the correct method to multiply color. 2015-04-03 16:33:03 +02:00
Cedric BAIL 83557d7175 evas: correctly define stride for Ector Cairo backend. 2015-04-03 16:32:59 +02:00
Cedric BAIL 1b4647bee8 evas: multiply the parent color with the object color.
It is necessary to actually propagate the Evas_Object_VG own color to all its
Evas_VG_Base object.
2015-04-03 16:31:51 +02:00
Cedric BAIL f8cd006b2f evas: and now fix Evas GL backend to display Evas_Object_VG correctly. 2015-04-03 16:31:49 +02:00
Cedric BAIL e4b5167861 evas: add support for alternate Ector rasterizer based on FreeType. 2015-04-03 16:31:48 +02:00
Cedric BAIL 7d480ac858 evas: fix missing initialisation of engine function call. 2015-04-03 16:31:41 +02:00
Cedric BAIL fbc2261048 evas: fix creation of cairo context with GL backend. 2015-04-03 16:31:12 +02:00
Cedric BAIL 61c1e7d103 evas: fix initialisation of cairo context in software backend. 2015-04-03 16:31:11 +02:00
Cedric BAIL 514406dc47 evas: fix switch from MMX to FPU. 2015-04-03 16:31:07 +02:00
Cedric BAIL 44d5a17485 evas: eina array macro don't work well on NULL array. 2015-04-03 16:30:50 +02:00
Cedric BAIL 23c34b96d3 evas: add theoric GL backend support. 2015-04-03 16:30:44 +02:00
Cedric BAIL f2380b0920 evas: introduce begin and end operation on an Ector surface.
This is necessary for GL has you want to map once and run with it, but it
will also help the software backend to not remap the surface all the time !
2015-04-03 16:30:44 +02:00
Cedric BAIL b6ffe1cc87 evas: first implementation of an ector drawer inside Evas software engine.
Note: this won't work with the OpenGL backend.
2015-04-03 16:22:18 +02:00
Cedric BAIL fcbc29f85e ector: move dependency around. Evas now depend on Ector. 2015-04-03 16:21:57 +02:00
Jean-Philippe ANDRE 2748fae3f4 Evas GL common: Fix shaders for GLX
Oops! There had to be a breakage somewhere. That's it :)
Thanks Oleksander Shcherbina for the report.

Fixes T2266.
2015-04-03 17:57:07 +09:00
Jean-Philippe Andre 676c10b153 Evas GL common: Fix GL masking with 12,21,22 sampling
This is a new feature introduced by the shaders refactoring:
even masking shaders now support smooth sampling of the masked image
using the special 12,21,22 shaders.

Also, refactor the list of texture bindings so that it's
automatically generated by the script, as opposed to being a
manual list...
2015-04-03 15:45:07 +09:00