Commit Graph

57 Commits

Author SHA1 Message Date
Chris Michael 9a542d0dcc evas-gl_drm: Remove set but unused variable
Variable 'osurface' is not actually being used inside the code here,
so remove it.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-17 16:07:14 -05:00
Dongyeon Kim 16eb3942bb evas/gl: Do not check for egl errors with glEGLImageTargetTexture2DOES
Summary:
glEGLImageTargetTexture2DOES is a GL extension API, so we need to use
glGetError instead of eglGetError!
2015-11-12 10:03:10 +09:00
Chris Michael 962059dd0a evas-gl-drm: Implement eglSetDamageRegionKHR
Summary: In efforts to reduce tearing in the gl_drm engine, implement
support for eglSetDamageRegionKHR to mark parts of a surface as being
damaged.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-04 11:20:39 -05:00
Chris Michael b2785f01c5 evas-gl-drm: Find symlink for eglSetDamageRegionKHR
In efforts to reduce tearing in the gl_drm engine, find and link to
the eglSetDamageRegionKHR function so we can mark damaged regions of a
surface

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-04 11:18:25 -05:00
Chris Michael f55d0a3d07 evas-gl-drm: Set Outbuf vsync according to engine
The engine setup code already checks if we are disabling vsync
(defaults to on), so we should be setting the Outbuf vsync according
to what the engine info has

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-04 09:24:18 -05:00
Mike Blumenkrantz 99d0f03c6f evas gl_drm: don't deref null ptr on output free 2015-11-02 16:21:56 -05:00
Chris Michael 0c9011d9e0 evas-gl-drm: Fix issue of gl_drm engine not working
Summary: With linux kernels >= 4.2.x, the gl_drm engine was not
functional. This is due to the egl config returning an improper config
which did not match the expected pixel format. This commit fixes that
issue and gl_drm evas engine works again. Should fix ticket T2807

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-02 09:30:30 -05:00
Srivardhan Hebbar 5964a44826 evas: removing redundant assignment in gl_drm.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-31 02:12:06 +01:00
Chris Michael b1bbe1f47c evas-gl-drm: Resize gbm surface when canvas size changes
Summary: When we are told to resize the canvas, we should also be
resizing the gbm_surface. This should fix the issue of wl_drm module
in E not working when the canvas gets resized (WFM now)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-30 14:49:01 -04:00
Chris Michael 5746f792af evas-gl-drm: Move definition of Render_Engine out to header
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-30 14:47:20 -04:00
Cedric BAIL 0d6c53268d evas: follow API documentation more closely. 2015-10-13 11:45:52 -07:00
Chris Michael ba5d3b0480 evas-gl-drm: Add support for 'smart' merge mode
Summary: This just adds support for 'smart' merge mode in the evas
gl_drm engine to keep in line with gl_x11 engine.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-01 09:00:44 -04:00
Cedric BAIL 72b13c3ebb evas: move all GL safe define to a common header and use it. 2015-09-30 15:12:48 -07:00
Jean-Philippe Andre 8310b0dec7 evas/gl_drm: Fix compilation with mesa 10.6.3 on Debian
Thanks @aerodynamik for the report.

Fixes T2616
2015-07-30 14:59:22 +09:00
Jean-Philippe Andre f8dda3350c Evas: Fix wayland-only compilation without Xlib headers
If the Xlib headers are not installed, a special macro must
be defined before including EGL headers.
2015-07-23 16:24:29 +09:00
Chris Michael 4e6b06dfd7 evas-gl-drm: Cleanup compiler warnings when building gl_drm engine
Summary: This cleans up nasty compiler warnings when building the
gl_drm engine. If we do not define EGL_EGLEXT_PROTOTYPES then we end
up with implicit declaration warnings

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-18 09:59:29 -04:00
Chris Michael cdbaa65bd4 evas-gl-drm: Add support for EGL_MESA_platform_gbm
Summary: This change adds support for using EGL_MESA_platform_gbm to
get the display directly from gbm and to create a window surface
(usable by egl) directly from the gbm surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-17 10:19:29 -04:00
Chris Michael 88cb6b74bf evas-gl-drm: Cleanup gl_drm engine code a bit more
Summary: This cleans up the gl-drm engine code a bit and avoids the
need to constantly destroy and recreate the gbm device itself. This
also adds checks during Outbuf create to handle the swap_mode as per
previously added enum.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-12 11:50:24 -04:00
Chris Michael 9315424bac evas-gl-drm: Move gbm_surface field to Outbuf structure
Summary: This moves the Engine_Info's gbm_surface field to the Outbuf
structure

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-12 11:50:24 -04:00
Chris Michael 8809979ce3 evas-gl-drm: Add swap_mode enum
Summary: This adds an enum we can use for setting/determining the
swap_mode to use for the gl_drm engine

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-12 11:50:24 -04:00
Chris Michael 50a37e72fc evas-gl-drm: Trap for invalid gbm bo
Summary: If we fail to lock the front buffer, we will not get a valid
bo returned so we should not be calling other functions which require
a bo.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 13:40:35 -04:00
Chris Michael 939d221ff1 evas-gl-drm: Fix issue with swap mode returning wrong value
Summary: This fixes a crashing issue in evas image cache due to the
engine returning an improper swap mode.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:45 -04:00
Chris Michael a83bb5e45d evas-gl-drm: Refactor gl_drm engine to not use dumb buffers
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:45 -04:00
Chris Michael 70b674d06c evas-gl-drm: Create eglContext before eglWindowSurface
Summary: We should be creating the eglContext before trying to create
the window surface.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael 47a2602af7 evas-gl-drm: Readd support for pre_swap/post_swap callbacks
Summary: The pre/post swap callbacks were forgotten when doing the
engine rewrite, so readd them

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael ee593050f1 evas-gl-drm: Rework gl_drm engine to function again
Summary: Previous gl_drm evas engine code did not work properly (or at
all really). This reworks/refactors the gl_drm engine code to work
again with the changes made to ecore_drm.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael 58dbb63ba4 evas-gl-drm: Remove old engine code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Dongyeon Kim 517109858e Evas GL: Match FBO config with window surface config
Summary:
When direct rendering is enabled, FBO configuration should match
window surface configuration as FBO will be used in fallback cases.
So create FBO with configuration from window surface.
@fix
2015-06-03 11:30:22 +09:00
Chris Michael 6929172a81 evas-gl-drm: Fix formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-01 14:06:21 -04:00
Mun, Gwan-gyeong 648091a1ad evas-drm: Fix evas-gl_drm picking incorrect resolution/mode for outputs
Summary:
Fix evas-gl_drm picking incorrect resolution/mode for outputs
   reference,  commit: d3a207bf9a

Reviewers: zmike, cedric, raster, gwanglim, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2447
2015-04-29 08:49:06 -04:00
Sunghyun Kim 9a767921c5 evas/gl_x11: add env variables for disable partial rendering
Summary: add 'EVAS_GL_PARTIAL_DISABLE' environment variables for disable partial rendering

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: mer.kim, spacegrapher, cedric, wonsik

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

Signed-off-by: Jean-Philippe ANDRE <jpeg@videolan.org>

jpeg added atoi(s) and copied the code for gl_drm and wayland_egl.
2015-03-23 17:33:25 -07:00
Jean-Philippe ANDRE 5bc4b89115 Revert "evas/gl_x11: Optimize out calls to make current"
This reverts commit 0585540bb3.

This broke Evas 3d examples. I also suspected some weird things and
wasn't 100% confident with this patch.

Closes T2215.
Thanks for the report.
2015-03-24 06:27:20 +09:00
Minkyoung Kim 0585540bb3 evas/gl_x11: Optimize out calls to make current
Summary: Reducing the number of calling eglMakeCurrent.

Reviewers: jpeg

Subscribers: wonsik, cedric, spacegrapher

Differential Revision: https://phab.enlightenment.org/D2094
2015-03-17 11:47:35 +09:00
Wonsik Jung 25502e37f8 evas_gl: Add feature to set depth/stencil/msaa bit to window surface.
Summary:
When Evas GL runs with direct rendering, it can not set depth, stencil and msaa to Window surface.
This patch is possible to use "option" input paramater of ecore_evas_gl_x11_options_new.
So, new API is not needed.

The other patch is in elementary. The elementary patch will be used this patch.

Test Plan: Test elm gl veiw in elementary_test and JP's test app.

Reviewers: spacegrapher, cedric, raster, jpeg

Reviewed By: jpeg

Subscribers: cedric, mer.kim

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Note: jpeg changed the original patch a bit (fix style and depth value)
2015-03-16 14:50:56 +09:00
Chris Michael d7a8626f5b evas-gl-drm: Fix T2158: compile fails when --with-opengl=full is passed
Summary: This fixes compile for the gl_drm engine if
--with-opengl=full is passed on the cmd line. These changes are
based on the diff provided by spotrh in the above ticket.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-01 10:49:10 -05:00
Chris Michael f14a893ce5 evas-gl-drm: Cleanup compiler warnings for dbg/err messages
Summary: This commit compiles out the debug messages that were
generating compiler warnings during build. You can reenable these
messages if you uncomment GL_DRM_DBG in evas_engine.h

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-01 10:45:39 -05:00
Cedric BAIL 93333ede15 evas: refactor shutdown. 2015-02-23 11:35:29 +01:00
Cedric BAIL 552a38cde5 evas: refactor software engine initialisation. 2015-02-20 15:04:52 +01:00
Jean-Philippe Andre 651f0ae241 Evas GL common: Improve code readability (simplify macro)
The exact same ugly macro would appear hundreds of times in the GL
code:
  GLERR(__FUNCTION__, __FILE__, __LINE__, "");

Instead, override the common GL functions iif GL_ERRORS is defined.
This greatly simplifies code and removes tons of useless lines.
Also, this will give better debugging output as the exact code line
is printed, and the function name is also printed.

Also, fix linking to the glerr function.

This is a code cleanup. Hopefully I didn't break anything with this
big operation of find & replace.
2015-02-12 11:23:03 +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
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
Jean-Philippe Andre 6d652589ad Evas GL: Print GLSL version with EVAS_GL_INFO 2014-11-27 20:50:40 +09:00
Chris Michael b7e959c715 evas-gl-drm: Fix initialization from incompatible pointer type
Summary: The function prototype for eng_context_create has recently
changed in gl_common, however nobody thought it wise to update all
engines using it, so this commit fixes the function for the gl_drm
engine.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-24 08:37:51 -04:00
Chris Michael b41867cd77 evas-gl-drm: Cleanup formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-22 09:24:14 -04:00
Jean-Philippe Andre c17cfbd13e Evas GL: Add support for PBuffer surfaces with GLX
Not fully tested, but allows calling evas_gl_make_current, so
it works for dummy surfaces (eg. 1x1 for a render thread).
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre 47ddb889ad Evas GL: Add support for OpenGL-ES 1.1 (part 3)
This introduces XPixmap usage for indirect rendering.
Of course this works only for the gl_x11 engine... and for
now only when using EGL... and only on some drivers...
damn limitations.
Direct rendering should work on more platforms (eg. some desktop
nvidia cards with the EGL drivers).
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre 4315537820 Evas GL: Add support for OpenGL-ES 1.1 (part 2)
Add version param to context_create.
Add support for 1.1 contexts in the GL_X11 engine, and checks
for version in all other engines (return NULL).
Add API wrappers for all OpenGL-ES 1.1 APIs (normal and debug
modes).
2014-10-20 12:16:08 +09:00
Jérémy Zurcher 119134751f evas/engines: avoid redefinition of typedef Outbuf
'typedef struct _Outbuf Outbuf' is in software_generic/Evas_Engine_Software_Generic.h
that is always included
2014-09-23 11:16:47 +02:00
Gwanglim Lee bcf887153e evas/gl_drm: Remove drm own_fd handling from gl_drm engine
Summary:
These are obsolete codes because evas engines no longer
has a use case for handling the drm file descriptor. And also it
is the same change as what Stefan Schmidt did to evas_drm.

Test Plan: N/A

Reviewers: devilhorns, stefan_schmidt, cedric, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1452
2014-09-16 11:17:39 +02:00