Commit Graph

116 Commits

Author SHA1 Message Date
Carsten Haitzler 6474d29127 this is an improvement of kakaroto's map buffer stuff - it's not
runtime detected and enabled, not compile-time, and env var can turn
it off forcibly if detected.



SVN revision: 76644
2012-09-14 07:27:49 +00:00
Youness Alaoui 49e4b498a2 Evas : Use server based buffers for vertices instead of client buffers
Implement a auto-free system of the allocated buffers to avoid using
resources that we may not need anymore.

SVN revision: 76490
2012-09-12 06:19:50 +00:00
Carsten Haitzler 54650e7e56 fix font glyph issue when gl enignes shut down leaving font glyph data
for textures in the font core.



SVN revision: 75243
2012-08-14 08:31:59 +00:00
ChunEon Park a3e8b5736d evas/gl - more clean code
SVN revision: 74420
2012-07-26 07:43:47 +00:00
Sung Park 7aadae8ff2 Adding MSAA extension define for Evas GL MSAA surface support.
SVN revision: 71570
2012-05-31 01:16:53 +00:00
Carsten Haitzler bbf95e48b7 i don't believe that we forgot that desktopgl has an unload for shader
compiler... use it. minor minor minor.



SVN revision: 70374
2012-04-21 01:51:58 +00:00
Youness Alaoui 3cbe46ccc9 Evas: engine for Mac is GL_COCOA not GL_QUARTZ
SVN revision: 66964
2012-01-08 07:21:35 +00:00
Carsten Haitzler dbc5afdee2 sorry sungwoo - going to have to back this dlopen/dlsym styuff out.
intel drivers don;'t like it for some odd reason - i'm trying to track
it down but i can't sanely try middlegrounds right now (eg dont
dlopen/dlsym but actually directly assign symbols etc.), so back out
and let's figure this out before it goes back in :(



SVN revision: 66308
2011-12-18 05:03:24 +00:00
Carsten Haitzler 5967841988 I'm attaching a patch for the initial version of the GL Fastpath
addition to evas gl backend.

Working on different mobile devices, we've noticed that the cost of context
switch (MakeCurrent) in GL can be very expensive depending on the driver
implementation.  To minimize the poorly written driver's context switch
overhead, I've implemented a state tracking layer on top of the driver
implemented GL.

Essentially, this layer wraps all the GL/Glue(GLX/EGL) APIs and manages its own
state changes.  Internally, only one real GL context is created and logical
contexts are created every time a user requests context creation.  The logical
contexts keep track of its states and sets only the necessary states
(the ones that are different than the current ones)
when there is a MakeCurrent request.  The real MakeCurrent gets called when
there is a Surface/Window change request.

The GL library is dlopened and all the APIs are dlsym'ed and wrapped
accordingly.  All the GL functions are in evas_gl_core.{h,c}.

Here's a very simply flow of the code.
   - all the APIs are exported as function pointers (*glsym_glBegin),
     (*glsm_eglCreatContext), and etc.
   - all the native GL/Glue(GLX/EGL) APIs are dlsym'ed as _sym_glBegin,
     _sym_eglCreateContext, and etc.
   - all the fastpath APIs are implmemnted as fpgl_glBegin,
     fpgl_eglCreateContext, and etc.
   - if faspath is seletected, the exported APIs are set accordingly
     ie. glsym_glBegin = fpgl_glBegin;
   - default mode is the regular gl symbols are directly set.
     ie. glsym_glBegin = _sym_glBegin;
             
I have an Environment variable where you can set it to three different Modes

EVAS_GL_FASTPATH = 0    // Default mode. Regular GL symbols are directly loaded
EVAS_GL_FASTPATH = 1    // Fastpath mode. Takes the path described above.
EVAS_GL_FASTPATH = 2    // Wrapped mode.  All the regular GL functions are
                           wrapped once.  This can be used for various
purposes

Since all the GL symbols are now loaded in this library, I took out all
the gl symbol loading parts in the evas gl backend as you'll see in the patch.
The changes to the engine and the backend itself is pretty minor.

There are still some known issues to hammer out but I thought we're at a good
place for an initial version so that my source doesn't diverge too much.

Known Issues and To Do's
* Current GL Fastpath version doesn't support multiple threads. Instead of
  having one global real context, I would need to do it for each thread. I'll
  get on this soon.
  
  * Issues running Evas GL on certain conditions.  When running the elementary
  test (with gl engine), if you run ELMGLview test that runs in ON_DEMAND mode,
  everything works fine. BUT, when you run the ELMGLView test in ALWAYS
    mode, the subsequent elm tests shows blank screen. When you destroy the
  GLView window, everything else comes on fine.
  
  * Resource protection code.  This actually applies to Evas GL code in general
  as well. Since all the resources are shared among all the contexts that get
  created, I would like to eventually have a resource protecting mechanism that
  prevents access to resources outside of its context unless specifically
  specified.
  
  I'm attaching three files
     - evas_gl_core.h, evas_gl_core.c, fastpath.patch
     
  To get the code running...
     - copy evas_gl_core.{c,h} to src/modules/engine/gl_common/
     - apply the fastpath.patch
     - compile/install evas
     - to run with fastpath GL (ie. % EVAS_GL_FASTPATH=1 ./evasgl_sample1)



SVN revision: 65891
2011-12-05 08:54:14 +00:00
Carsten Haitzler dcb34d789b handle refcounting of dyn img data to allow for get, get, set, set
pairs.



SVN revision: 65051
2011-11-11 07:36:15 +00:00
Carsten Haitzler ab7d9bdd84 fix use of invalid program id IF viewport changed - also disable
GLERR. this can really hurt performance.



SVN revision: 64027
2011-10-12 23:22:26 +00:00
Carsten Haitzler 0bfb70e48e oops - typo.
SVN revision: 63967
2011-10-11 01:51:49 +00:00
Carsten Haitzler 7597814df2 adapt to SEC direct texture access changes for the last time.
SVN revision: 63959
2011-10-10 10:08:29 +00:00
Cedric BAIL cc71e34616 evas: zero swizzeling code for Samsung platform.
SVN revision: 63727
2011-09-30 15:51:32 +00:00
Cedric BAIL 120306f05f evas: add YUV double buffering for OpenGL backend.
SVN revision: 63225
2011-09-06 07:56:47 +00:00
Cedric BAIL 20300dfedc evas: and now MT12 gain Open GL support.
SVN revision: 63174
2011-09-04 21:15:04 +00:00
Cedric BAIL 26ee52dd61 evas: add NV12 and MT12 colorspace.
MT12 is has documented in Linux videodev documentation
a 64 * 32 macro block tiled colorspace format used on
Samsung hardware.


SVN revision: 62967
2011-08-29 20:56:48 +00:00
Cedric BAIL cea7b9dddb evas: refactorize OpenGL engine.
SVN revision: 62752
2011-08-24 16:20:15 +00:00
Cedric BAIL 7ae4bd0f31 evas: add YUY2 shader to GL engine.
TODO: add NV12 and NV12T to evas.


SVN revision: 62721
2011-08-23 15:13:40 +00:00
Vincent Torri 18d1e68924 whitespaces--------
SVN revision: 60426
2011-06-17 07:47:28 +00:00
Carsten Haitzler 5d2bd283c3 disable evas filter code. buggy. doesn't work right.
SVN revision: 59898
2011-06-02 10:40:43 +00:00
Jiyoun Park 56111d2b69 From: Jiyoun Park <jy0703.park@samsung.com>
Subject: [E-devel] [Patch] Evas gl shader use binary shader

I make patch related with evas gl binary shader.
 
The concept of binary shader is  compile shader only once.
 
Some people want to use binary shader because of performance issue.
 
In current evas gl engine, every application have to compile shader each
time. 

But I modify code , so only first running application need compile shader.

Other application use already compiled shader(binary shader)

 
The binary shader is made under HOME/.evas/gl_common_shaders directory. 

Binary shader is created according to GL vendor,GL renderer, GL version and
Module_arch.

The basic flow is
 
1.     First running application which use gl engine check binary shader
directory, but it can't find binary shader. 
2.     After compiling shader, It saves compiled shaders..
3.     Other application checks shader directory, it can use binary
shaders.
 
In mobile target, using binary shader, I can save 150ms. (that time, there
is 11 shaders).

If there is more shaders and more applications, this flow maybe save more
total time. 

(the above is now in, changelog coming, with change to using ~/.cache,
some formatting fixes, make ity do the desktop gl one right with the
retrievable hint parameter ont he program etc. - doesn't break desktop
gl at least. yay. a,so fixes to mke it compile at all).



SVN revision: 59167
2011-05-04 06:15:00 +00:00
Carsten Haitzler 7ed47808cb more bad code - why pass in void * image and data? sero point.. and it
totally is out of step with the rest of the api for gl_common.. that
alone would tell you "dont so that". ugh. more filter fixes.



SVN revision: 58746
2011-04-20 08:05:23 +00:00
Brett Nash 9eaea94252 Evas: Filters:
More work, proudly supported by Samsung.  Filters!

So now you can apply a whole host of cheesy visual effects to objects at
runtime.  This is the first commit, there are a couple of more to come as I
tweak the filters, and fix blur with GL[1].

Please direct bugs to me nash@nash.id.au.

[1] You'd think shaders would be good at this.. but no, generic blur and GL
are like trying to get an apple product to work with Linux.

SVN revision: 58726
2011-04-19 05:47:56 +00:00
Brett Nash b96d227334 Masking: Push a bit more arbitrary clipping
This seems to have got lost in my big messup before.  This pushes enough of
mask/arbitrary clip to be somewhat useful.  I need to push a little more soon
for it to be 100% happy, but this is useful level.

SVN revision: 58373
2011-04-06 05:38:38 +00:00
Cedric BAIL 30f906aac9 evas: one more death: gl_glew !
SVN revision: 58360
2011-04-05 13:19:20 +00:00
Carsten Haitzler 8859f850fb API add: From <dunamis.park@samsung.com> - sungwoo
start of evas gl api (with compile warning fixes).



SVN revision: 58318
2011-04-04 10:23:12 +00:00
Carsten Haitzler 6b4d91830e wer can release compiler data if we want when done with glsl compiling.
SVN revision: 58172
2011-03-29 09:10:57 +00:00
Cedric BAIL 76a0da7a1c evas: rename Evas_GL_Context to Evas_Engine_GL_Context
patch by Sung W. Park <sungwoo@gmail.com>


SVN revision: 57803
2011-03-16 17:32:49 +00:00
Carsten Haitzler d0ac8d8601 fix up gl side image cache to cleanly ref/deref and shadow image
cache. yes - changelog - this is just fixing up whats already
changelogged.



SVN revision: 56949
2011-02-11 06:23:10 +00:00
Carsten Haitzler aaad5f7319 fix most of nash's mess. 2 added aborts that nash has to fix.
SVN revision: 56891
2011-02-10 06:52:53 +00:00
Carsten Haitzler 7881c0b849 improvement to gl engine wrt. caching.
SVN revision: 56801
2011-02-08 11:41:38 +00:00
Carsten Haitzler fdc17c8c84 oooh thank you valgrind! found some bad mem access stuff in the gl
engine on shutdown. was freeing the wring kind of thing in the first
place.. and even then it should be more robust, so fix gl texture
robustness and this bug. can cause on-exit crashes if not fixed.



SVN revision: 56068
2011-01-13 10:41:08 +00:00
Carsten Haitzler 87a0e6575d and avoid some work if there is nothing to flush at all.
SVN revision: 55978
2011-01-07 10:22:22 +00:00
Carsten Haitzler 13df30ab2b i read the other day that glgeterror... causes driverstalls.. at least
in some drivers/architectures... so this may slow things down. disable.



SVN revision: 55976
2011-01-07 10:04:41 +00:00
Carsten Haitzler 5bf2fbcc63 make sure they are extern fn pointers
SVN revision: 53831
2010-10-24 13:30:27 +00:00
Gustavo Sverzut Barbieri 379b546adf better logging.
* log domains in lower-case only please. let's make it a standard so
   we don't have to look at the code everytime to figure out the name...

 * logs do NOT require trailing newline (\n), it's automatic!

 * do NOT add newline inside log messages!

 * add gl_common logging.

NOTE: I tried to compile all modules, but there are clear broken
      modules such as cairo and qtopia. Other modules like gl_sdl are
      broken as they were not updated to new gl_common api (resize
      method AFAIR).



SVN revision: 53174
2010-10-07 23:46:42 +00:00
Carsten Haitzler 6abe0b3a94 fix flipped object texture if map enabled AND object happens to be
exactly viewport size.



SVN revision: 52940
2010-10-01 06:22:31 +00:00
Carsten Haitzler 0e560f9db2 and make values int so we can have "-1" :)
SVN revision: 52934
2010-09-30 23:23:51 +00:00
Carsten Haitzler 5938bb97f7 found the gl engine flashing white bug with laucnher 3 map test! aaah
gl state bug/assumption. reset state when moving from 1 surface target
to another and then we are all happy. also fix lip geometry issue in
gl when rendering to non-default surf - related.



SVN revision: 52933
2010-09-30 23:20:26 +00:00
Carsten Haitzler 011b2ce822 brutally evil... internally.. but it works. map perspective correct
now in gl engine. hooray for that. one complaint less.



SVN revision: 52566
2010-09-22 06:52:28 +00:00
Gustavo Sverzut Barbieri d89ebf341b cleanup: internal image information is now unsigned.
There is no meaning in negative values for image loading, marking as
dirty or size, so image internals (cache, entry) were changed to
unsigned, reducing possible errors, particularly with overflow.

engines were converted to the new way, but any 3rd party modules will
still work as they should be using values >= 0 only anyway.

please review.

new cases introduced by "comparison between signed and unsigned" were
fixed in the modules that used cache_entry or Image_Entry dimensions.



SVN revision: 52428
2010-09-18 23:16:25 +00:00
Carsten Haitzler 47fbbe6196 well dldrawarrays doesnthave a limit according to the gl spec - but
drivers may implement one. as such add a check. but check and fix
seems to fail for some rendering. wonder why?



SVN revision: 51923
2010-09-06 13:36:32 +00:00
Carsten Haitzler c67a9ac86a and fix gl engine to actually do map for yuv images! :) fix fix.
SVN revision: 51893
2010-09-05 02:58:30 +00:00
Carsten Haitzler 9d7a3a2bfc silence gl enging output unless you set EVAS_GL_INFO in env. move some
fixed numbers into env vars for tuning purposes and debugging ... and
importantly - fix a smooth vs non-smooth texture mode thing.



SVN revision: 51651
2010-08-26 01:41:48 +00:00
Cedric BAIL 05e8154f8b * evas: remove gradient and gradient2.
SVN revision: 51219
2010-08-16 15:14:49 +00:00
Carsten Haitzler 2d3ea36109 more work on egl image direct access.
SVN revision: 51070
2010-08-13 10:34:51 +00:00
Carsten Haitzler 01b7216880 more glue/infra. glue evas api to engine together. gl engine gets stubs.
SVN revision: 51028
2010-08-12 06:11:13 +00:00
Carsten Haitzler 83f2ef6142 working on new gl engine feature. inactive right now.
SVN revision: 51027
2010-08-12 06:02:15 +00:00
Carsten Haitzler 6320a8db84 make new pipes have an env var for tuning, remove old comment code,
fix up yuv and maps to use pipes too. yes lines just flush it all - so
be it. :) who uses lines anyway?



SVN revision: 50918
2010-08-09 04:42:15 +00:00