Commit Graph

173 Commits

Author SHA1 Message Date
Marcel Hollerbach bb6c7c6782 meson: make it possible to link our engines against evas
Summary:
it FINALLY happend! With this python bindings should be able to work
again with a meson build, you can also enable b_lundef right now. And it
appears to work, with this we can also get another step closer to a
windows build.
Depends on D8669

Reviewers: zmike, stefan_schmidt, cedric, vtorri

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8670
2019-04-19 14:39:31 -04:00
Marcel Hollerbach c8c374ef48 meson: move build definitions of software_generic to libevas
Summary:
with this we don't have any static module anymore in the engine
directory. This means either *all* modules in the enignes directory are
static OR shared. There is no mixture anymore. This is a requirement for
the directory to be build whenever we want it to be build.
Depends on D8667

Reviewers: zmike, stefan_schmidt, cedric, vtorri

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8668
2019-04-19 14:39:22 -04:00
Carsten Haitzler 3439134ea1 Revert "evas gl engines - avoid getting context if possible"
This reverts commit e7771438a2.

This should fix T7764

zmike - you're right. thanks for narrowing down the commit... revert
time.
2019-03-29 00:18:13 +00:00
Christopher Michael f5fed8764d evas-gl-drm: Fix issue of rotation not actually rotating
When we call evas_outbuf_reconfigure (when rotation changes), we need
to update the Outbuf with new values for width, height, rotation, etc.
Failing to do this here causes any rotations applied to the engine to
fail.

ref T7690

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8109
2019-03-06 11:34:51 -08:00
Carsten Haitzler b9049925f3 evas gl - swap with damage - look for KHR extn string too
as per shortlog - look for KHR in addition to EXT for swap with damage
region extn detection.
2019-02-28 11:14:56 +00:00
Derek Foreman 70b16099a9 gl_drm: use dlsym looked up symbol for extension check
We looked this up with dlsym, so I guess we should use that even though
the direct call seems to work just fine most of the time.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7433
2018-12-14 10:29:55 -06:00
Carsten Haitzler e7771438a2 evas gl engines - avoid getting context if possible
so getting context at least on some dviers is expensive. it may really
impact cpu usage a lot (in this cate getpid() was being called by the
nouveau drivers and that can be expensive. it is on ARM as it's a full
syscall and 1-2% of cpu time was just getting pid all the time thanks
to this...

@opt
2018-11-09 11:43:58 +00:00
Marcel Hollerbach d3122474d4 meson: link gl_drm to gdm
gl_drm uses that - this was forgotten. Sorry.

Reported by ApBBB.
2018-10-13 12:10:39 +02:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Chris Michael 96a46ea944 evas-gl-drm: Remove cserve2 support
Summary:
ref T7226

Depends on D6931

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6932
2018-08-30 13:44:30 +09:00
Mike Blumenkrantz a6731320f5 evas engines: do not immediately free native surface when unsetting it
Summary:
this is a longstanding issue which was exposed by recent patches to standardize
object lifecycles. when a native surface is used by multiple images, unsetting
the surface from one image must not destroy the native surface or else the
remaining images

fix T6970

@fix

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6970

Differential Revision: https://phab.enlightenment.org/D6235
2018-06-05 12:14:30 -05:00
Derek Foreman cdc33f5874 gl_drm: Use gl extension string helper instead of strstr 2018-03-08 14:33:05 -06:00
Derek Foreman 3fc6eea24f gl_drm: Don't NULL init a variable we're about to set
minor clean up with no functional change.
2018-03-08 11:33:34 -06:00
Derek Foreman 37b9a246ba gl_drm: Check EGL client extensions before using platform_base
The comment here was right, we shouldn't just trust these without testing
if we should trust these.
2018-03-08 11:33:31 -06:00
Derek Foreman 3a15195088 gl_drm: Rename eng_gl_symbols to eng_egl_symbols
It now only deals with egl.  gl extensions must be queried later, so it
was previously a bit weird/confusing.
2018-03-08 11:16:01 -06:00
Derek Foreman 609c86903f gl_drm: Move some extension queries to after context creation
Anything non-EGL we might query would have to be queried here, so
I'm moving the call here to protect us in the event that we need GL
extensions in the future.

I'm still a bit confused as to what string I should be passing to
evas_gl_symbols, though.
2018-03-08 11:15:57 -06:00
Derek Foreman 329e9c0b4b gl_drm: use EGL_IMG_context_priority if available
This is a hint that we want a high priority context.  Since gl_drm is
likely a compositor or a full screen app, it makes sense that it try to
use this (but other engines probably shouldn't)

Based loosely on Chris Wilson's weston patch to do the same thing.
(weston commit b678befb6ed055e6c66466505d9195a3cebf8073)

As this extension appears to have been around for years, I haven't
added fallback defines for:
EGL_CONTEXT_PRIORITY_LEVEL_IMG  0x3100
EGL_CONTEXT_PRIORITY_HIGH_IMG   0x3101
2018-03-07 15:24:37 -06:00
Derek Foreman f8658d25fa gl_drm: Move the gl symbol check to immediately after display init
We don't actually need a context first, just an initialized display.
2018-03-07 15:24:37 -06:00
Derek Foreman c9ac2338d4 gl_drm: NULL check img
If we set native surface on a new object we can get here with NULL
engine_info from the caller.  We should still create a native surface.
2018-02-14 14:56:48 -06:00
Chris Michael af2960df0b evas drm engines: Fix variable type for output
We already include the Ecore_Drm2 header for these engines, so there
is no need for the 'output' field to be a void pointer here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-13 11:44:36 -05:00
Chris Michael e4d5528e34 evas-gl-drm: Don't pass invalid surface or bo to gbm function
This small patch just checks that we have a valid surface and bo that
we can pass to gbm_surface_release_buffer. If they are not valid, this
causes a hard crash.

NB: This does not actually Fix the ticket issue....

ref T6483

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-12-12 11:28:36 -05:00
Derek Foreman cbbac076f4 gl_drm: Use the same gbm_device for multiple instances
If we want to share a gl context (we do) between multiple instances of
gl_drm, we need to make sure they all use the same gbm_device.

This resolves a blocker for multi-output on the gl_drm backend.
2017-11-21 12:28:52 -06:00
subhransu mohanty aacf277c3a evas/vg: added support for engine surface cache. 2017-11-10 11:20:38 +09:00
Chris Michael 3ae469e648 evas-gl-drm: Remove need for useless region_free function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:27:39 -05:00
Cedric Bail 5e935a8ca9 evas: handle new API use correctly for gl_drm backend. 2017-08-28 11:32:13 -07:00
Cedric BAIL 28397e7206 evas: differentiate engine from output. 2017-08-25 10:49:53 -07:00
Cedric BAIL 3e88aa37bc evas: Render_Engine_Swap_Mode is actually about output swap. 2017-08-25 10:49:15 -07:00
Cedric BAIL f4afd5f1bd evas: reduce duplication of merge_mode getenv logic. 2017-08-25 10:49:06 -07:00
Cedric BAIL e6b4878a9e evas: follow all other engines convention and use ORD macro. 2017-08-25 10:48:37 -07:00
Cedric BAIL 29cde0ee81 evas: make the info size a parameter of the function to make it safer to roll in. 2017-08-25 10:48:20 -07:00
Cedric BAIL 46e1df839b evas: factorize call to info and info_free. 2017-08-25 10:48:13 -07:00
Cedric BAIL 1e2bbf8fea evas: all this function (info, setup and update) are really output related. 2017-08-25 10:48:09 -07:00
Cedric BAIL 6f3980f55e evas: Render_Engine_GL_Generic is actually an output. 2017-08-25 10:48:00 -07:00
Cedric BAIL 8ffc0f2b9e evas: prevent double tilebuf creation/destruction during window resize. 2017-08-25 10:47:52 -07:00
Cedric BAIL 600a5fa76c evas: all GL backend require strict tilebuf, let's make that the default. 2017-08-25 10:47:48 -07:00
Cedric BAIL 741ecaf2cf evas: no need to double init tilebuf as it is created by software generic. 2017-08-25 10:47:39 -07:00
Cedric BAIL 268d9984b4 evas: engine should not access Evas canvas directly. 2017-08-25 10:47:03 -07:00
Derek Foreman 135ac29817 gl_drm: Remove some stale comments
We do planes now, so this comment isn't helpful anymore.
2017-08-09 14:56:58 -05:00
Derek Foreman 8ff59b2c55 ecore_drm2: Pass Ecore_Drm2_Device instead of fd to most functions
Intended to simplify the upcoming commit that merges device find and
device open into a single function that returns a device.

The fd is something callers shouldn't really need to get their hands on,
right now there are still a few places where it's needed, but those will
be gone soon too.
2017-08-09 14:56:58 -05:00
Derek Foreman 736c63be34 gl_drm: half fix eglGetPlatformDisplayEXT usage
Just because the #define is present doesn't mean the extension is, so we're
BAILing on egl completely on some systems for no good reason at all. (saw
this on an SGX stack)

This is still wrong.  I don't want to try too hard until after the upcoming
release, though.

We should actually be testing for the presence of client extensions before
attempting to do any of this.  It's entirely possible that a gl stack will
return bogus functions for these from eglGetProcAddress
2017-07-21 14:34:50 -05:00
Derek Foreman eda81c6dff gl_drm: Defer gl symbol lookups until they're possible
See previous commit for details.
2017-07-19 12:02:03 -05:00
Derek Foreman 7fd66e84d9 gl_drm: de-wtf the eglGetProcAddress prototype
This doesn't seem to serve any purpose other than rigorous proof that
typecasts can make literally anything compile.
2017-07-19 11:43:25 -05:00
Carsten Haitzler 2e6587a14b evas gl - fix compositing/native surface with egl/gles after glvnd
this fixes an issue that has cropped up in the past few months - only
nvidia drivers with egl/gles in x11... and compositing won't work
(native surface) and the introduction of libglvnd

it's a combination of libglvnd lying that it has symbols it can't
later find, new features to get core functions via procaddress that we
hadn't migrated to use AND use preferring core functions that libglvnd
will expose, so switching to KHR extensions by preference. we also
need to symmetrically use destroy image khr too...

oddly enough using procaddress purely for create/destroy image makes
wayland fail ... sofor now i'm taking advantage of the fact that
wayland has no extensions string passed in at the moment and still
doing dlsym... this is odd though.

@fix
2017-07-16 15:56:02 +09:00
Derek Foreman b8165098dc gl_drm: Improve dmabuf validity test
Now that higher layers are setting load errors this can be less gruesome.
2017-06-30 14:52:54 -05:00
Derek Foreman 944a4065e8 gl_drm: Check dmabuf attribute version before trusting attributes
We shouldn't do anything with a dmabuf structure until confirming the
version matches the one we know.
2017-06-29 16:12:35 -05:00
Derek Foreman 892bfe7c98 dmabuf: Make a define for the version of the dmabuf attribute struct
I should've done this in the first place, and the version checks are
starting to spread out a bit.
2017-06-29 13:51:07 -05:00
Jean-Philippe Andre 1ef1c04f42 gl_drm: Fix a few compilation warnings
warning: expression which evaluates to zero treated as a null
pointer constant of type 'void *' [-Wnon-literal-null-conversion]
2017-06-29 16:02:36 +09:00
Derek Foreman 33b50238d2 gl_drm: Implement hardware plane support
Adds the ability for gl_drm to place native surfaces on hardware planes.
2017-06-23 08:15:42 -05:00
Derek Foreman 4d058ad323 gl_drm ee: Move to new per fb status callbacks
Switch over to the per fb status callbacks as the old per output api is
about to be removed.
2017-06-23 08:15:40 -05:00
Derek Foreman bd0774206f gl_drm ee: move release fb callback
No functional change, just code motion.
2017-06-23 08:15:40 -05:00