Commit Graph

337 Commits

Author SHA1 Message Date
Mark Salyzyn
993146092f am d4dabf87: am cdbf28b3: Merge "native frameworks: 64-bit compile issues"
* commit 'd4dabf872ac0a12e12aebae9032f7d62762c2aeb':
  native frameworks: 64-bit compile issues
2014-03-13 23:12:09 +00:00
Mark Salyzyn
d4dabf872a am cdbf28b3: Merge "native frameworks: 64-bit compile issues"
* commit 'cdbf28b3f7f5327f4cb0eb95b8326bf4c24c87ba':
  native frameworks: 64-bit compile issues
2014-03-13 15:26:10 +00:00
Mark Salyzyn
92dc3fc52c native frameworks: 64-bit compile issues
- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
2014-03-12 13:12:44 -07:00
Simon Wilson
08d6aa9a90 am 8ffc2346: am 6e79cb81: Enable OMAP4 SGX workaround for OMAP3 too
* commit '8ffc2346b86ef5a0d686b43229d2bbd70545a208':
  Enable OMAP4 SGX workaround for OMAP3 too
2014-03-04 01:00:23 +00:00
Simon Wilson
8ffc2346b8 am 6e79cb81: Enable OMAP4 SGX workaround for OMAP3 too
* commit '6e79cb81d02984c9f7ac0586078f947c94c56c2a':
  Enable OMAP4 SGX workaround for OMAP3 too
2014-03-04 00:20:43 +00:00
Simon Wilson
6e79cb81d0 Enable OMAP4 SGX workaround for OMAP3 too
Change-Id: I04308d8b7435b4adf1811f75f48f9e8a07a8c8a6
2014-02-28 14:30:39 -08:00
Colin Cross
505350b150 am 8a9a2e24: am d5fe844b: Merge "Use /(vendor|system)/lib64/egl for 64-bit EGL libraries"
* commit '8a9a2e24db868fba404049d700ae704b0982e5f3':
  Use /(vendor|system)/lib64/egl for 64-bit EGL libraries
2014-02-18 20:25:54 +00:00
Dan Willemsen
8edb8f5f2d Use /(vendor|system)/lib64/egl for 64-bit EGL libraries
Change-Id: Ie64806bfe4ba60a3167b84685cf983d4ada1042d
2014-02-16 10:29:40 -08:00
Siva Velusamy
1d41d5d82c am 67041e68: am fd6a3ff4: Merge "GLES_trace: fix compile errors on 64 bit architectures"
* commit '67041e6841d89efb0dbaf4562b601b80be61e1e6':
  GLES_trace: fix compile errors on 64 bit architectures
2014-02-04 19:25:21 +00:00
Siva Velusamy
39177b4103 GLES_trace: fix compile errors on 64 bit architectures
GLES_trace passes some pointers back to the host. Encode them
using int64's rather than int32's

This fix requires an update to the host tool to look at pointers
as 64 bit, and if not found, then fall back to 32 bit integers.

Change-Id: I11ff2ca51290f05913c1b9143cecee1caf015543
2014-01-28 17:38:32 -08:00
Dan Stoza
4864e85430 Make libEGL build cleanly under 64-bit
Change-Id: I255dfb70b166b7469d59352b1acfc7aececa07de
2014-01-27 18:16:50 -08:00
Dan Stoza
c3289c41e7 Make libEGL build cleanly under 64-bit
Change-Id: I255dfb70b166b7469d59352b1acfc7aececa07de
2014-01-17 15:32:27 -08:00
Andy McFadden
d566ce3a26 Improve error message
The previous message indicated that the fault was due to an already-
connected window, which was misleading at times.

Bug 12439318

Change-Id: I1e0a042673dd245d1b0d237af963c52946803eb6
2014-01-07 15:54:17 -08:00
Igor Murashkin
1f8363329c EGL: rename CallStack::dump into CallStack::log
Bug: 11324229
Change-Id: Ibac1be182c336e7aa5ac098f08d18b3c188964b4
2013-10-25 17:13:57 -07:00
Jamie Gennis
dbe9245e2e GLConsumer: start using EGL_ANDROID_image_crop
This change makes GLConsumer use the EGL_ANDROID_image_crop extension when
available on a device.  The crop rectangle is passed to the EGL driver when
creating EGLImages, allowing the crop to be performed by the driver rather than
using the texture transform matrix.

Bug: 10897141
Change-Id: I63e9a5d5c85067376abc420e3639154468346311
2013-10-02 17:34:35 +00:00
Jesse Hall
a2ba428a22 Disable the egl_khr_gl_colorspace extension
Bug: 10777398
Change-Id: Ib50ea8b9d5d960537701b85929d6312304993a0f
2013-09-16 11:21:48 -07:00
Mathias Agopian
63108c34ec fix a possible null dereference when eglMakeCurrent() fails
Bug: 10648797
Change-Id: Iee0be47f2646feb25de4ea199bbb9b707452916e
2013-09-06 13:36:49 -07:00
Mathias Agopian
672ddf2b58 remove adreno 130 workaround support
Change-Id: I8ea5ee65d405114b30cfaa44e1a0c971d1ef2a61
2013-08-28 15:27:30 -07:00
Mathias Agopian
f4486c6ea4 try to keep omap4 alive
Bug: 10527646
Change-Id: Iec572a910e932115cf4f2e1215142b10cd91bd6f
2013-08-28 15:22:29 -07:00
Mathias Agopian
0f288fcc9c only use format compatible with CPU consumers
EGL now picks the buffer format out of a small set
of formats compatible with CPU consumers instead of
using the EGL_NATIVE_VISUAL_ID.

Bug: 10194508
Change-Id: If423cd29601b7a3ace8670f4c73004132cfc4b31
2013-08-21 16:36:34 -07:00
Jesse Hall
bc2a90b024 Replace sRGB_888 with sRGB_X_8888
Bug: 10357459
Change-Id: I3a1d92cce2c9d3e930408129fb20887276fffddc
2013-08-16 07:50:11 -07:00
Jesse Hall
c2e41222bf Add support for EGL_KHR_gl_colorspace
Change-Id: I684d0b8556cd6c84ee4b4d67e1bb95c3b96fccfb
2013-08-13 12:10:51 -07:00
Jesse Hall
ea4fdd4beb Don't swallow eglCreateContext errors
If the implementation eglCreateContext failed, we called
eglGetError(), so we could check that it set the EGL error properly.
But since we'd already called this, when the app called eglGetError()
it would get EGL_SUCCESS!

Bug: 10181333
Change-Id: Ic45d3a8fcb8c4421e04844c6d2f52761790b5948
2013-08-12 16:43:34 -07:00
Mathias Agopian
a6bb107434 make sure we have a context when creating the 1st surface
also add an option to dump the stack trace when
calling a GL function without a context.

Change-Id: I57b72bb8c322ac4253c3077bf150621bd9863b69
2013-08-08 16:38:06 -07:00
Jesse Hall
21558daf69 Add EGL_KHR_get_all_proc_addresses to extension string
We've had the extended behavior since Android 4.3, but the extension
hadn't been ratified by Khronos yet so we couldn't add it to the
extension string.

Bug: 9681677
Change-Id: I78842316a3ab7a3f66a0ac1a4742d837de664c4c
2013-08-06 15:33:46 -07:00
Andy McFadden
14fab7dd79 Drop frames based on presentation timestamp
If there are two or more buffers pending that are ready for
immediate presentation, drop all but the last one.

Any code that didn't explicitly specify timestamps for buffers
was using the default value (auto-generated "now").  As a result,
surfaceflinger would drop frames whenever more than one buffer
was queued.  We now use zero as the auto-generated timestamp,
and we don't set the timestamp in eglBeginFrame().

Change-Id: I187f42d33de227cd3411ff0dcd3b9ce1961457eb
2013-08-01 15:58:08 -07:00
Mathias Agopian
e142428a9c Make Flattenable not virtual
Fallout from the Flattenable change, update all its uses.

Additionnaly, fix/tighten size checks when (un)flatten()ing
things.

Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)

The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).

Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
2013-07-30 21:19:13 -07:00
Jamie Gennis
5539e219de EGL: fix eglTerminate blob cache behavior
Bug: 9610573
Change-Id: I258e7e0d82ab76fbacf0b9c25d4f92fca6df04ac
2013-07-30 15:12:16 -07:00
Jesse Hall
ba3ed90b09 am 082fc1ca: am ae961022: Merge "EGL: Fix error for eglCreateWindowSurface"
* commit '082fc1cae6a0c283de3ad0d848e0757de3154d0b':
  EGL: Fix error for eglCreateWindowSurface
2013-07-17 14:13:56 -07:00
Jesse Hall
082fc1cae6 am ae961022: Merge "EGL: Fix error for eglCreateWindowSurface"
* commit 'ae9610220b5f509687b840532f95f3638ee0146b':
  EGL: Fix error for eglCreateWindowSurface
2013-07-17 14:10:00 -07:00
Jonathan Hamilton
77a9b4a6bd EGL: Fix error for eglCreateWindowSurface
The EGL 1.4 spec section 3.5.1 states that EGL_BAD_ALLOC should be set
if the supplied window already has an associated EGLSurface, not
EGL_BAD_NATIVE_WINDOW as is currently set.

Change-Id: If1598617f4e31904f2045560ae1cdf49d8a697dc
2013-07-17 09:52:41 -07:00
Jesse Hall
94cdba97ce resolved conflicts for merge of 5477d0e4 to master
Change-Id: I7ca75a44018a68bf3a7ac1de17a3ef568a48d2ac
2013-07-11 09:40:54 -07:00
Jesse Hall
5477d0e4e8 am c07b5206: Find non-extension GLES wrappers in eglGetProcAddress
* commit 'c07b52060acd627c8510c1a9151e0753fce76330':
  Find non-extension GLES wrappers in eglGetProcAddress
2013-07-09 10:54:20 -07:00
Jesse Hall
c07b52060a Find non-extension GLES wrappers in eglGetProcAddress
This allows apps to find OpenGL ES 3.0 functions using
eglGetProcAddress() instead of dlopen/dlsym.

Bug: 9681677
Change-Id: I7ce6e1636bc47d6b0bf20a4e46bd67235714d129
2013-07-04 12:08:16 -07:00
Mathias Agopian
e0ea89ceef improve GLES jumptables
in the common case this saves one instructions per jump
(which will help with the i-cache).

this change also gets rid of the "use slow tls" option,
which was useless. So at least now architectures that don't have
assembly bindings will perform much better.

Change-Id: I31be6c06ad2136b50ef3a1ac14682d7812ad40d2
2013-07-01 15:52:47 -07:00
Jean-Baptiste Queru
da22e6bf36 am db8c267e: am 3c0425cd: am 0ecf0b8d: Merge "Additional parameter validation for EGL functions"
* commit 'db8c267ec26997771eb718c29d3dacd4e738051b':
  Additional parameter validation for EGL functions
2013-06-25 17:02:09 -07:00
Jean-Baptiste Queru
3c0425cd95 am 0ecf0b8d: Merge "Additional parameter validation for EGL functions"
* commit '0ecf0b8db74682222bf095a235e28edefff871a5':
  Additional parameter validation for EGL functions
2013-06-25 15:35:05 -07:00
Jean-Baptiste Queru
0ecf0b8db7 Merge "Additional parameter validation for EGL functions" 2013-06-25 22:31:13 +00:00
Mathias Agopian
4e620ddce3 free EGL resources associated to a thread when it terminates
destroyed but current-to-a-thread resources are only destroyed
when they're made not-current; however, we were not destroying
those when the thread itself terminated, causing these resources
to be leaked forever.

we now install a tls-key destructor that takes care of this
by calling eglReleaseThread upon thread termination.

Bug: 9209776
Change-Id: I88298a34e3a27488eb81eab76717715569c7d57c
2013-05-30 16:07:36 -07:00
Mathias Agopian
f03e51dd2f Merge "change how the userspace GLES drivers are named" 2013-05-02 23:25:52 +00:00
Jamie Gennis
565bce248b am 8369c473: am f6d1c393: EGL: expose the EGL_KHR_create_context extension
* commit '8369c4739a58367e9636c84facc272cf8ddcb070':
  EGL: expose the EGL_KHR_create_context extension
2013-04-29 12:14:26 -07:00
Mathias Agopian
993814255f change how the userspace GLES drivers are named
for single library:
  /vendor/lib/egl/GLES.so

for multiple libraries:
  /vendor/lib/egl/EGL.so
  /vendor/lib/egl/GLESv1_CM.so
  /vendor/lib/egl/GLESv2.so

EGL_BOARD_CONFIG as well as egl.cfg are not needed anymore.

To facilitate the transition, the loader will also look
for the older naming scheme.

Bug: 8631636
Change-Id: Id4b113468df29bae72b323f76598229914e1c7a1
2013-04-26 23:49:01 +02:00
Jamie Gennis
f6d1c3930e EGL: expose the EGL_KHR_create_context extension
Bug: 8616866
Change-Id: Ic60f9f21397a1760c552b6f141d5177d1cbaf1f8
2013-04-25 18:49:15 -07:00
Mathias Agopian
b4ba50dd83 fix a typo in EGL loader
the code intended to filter out the software-renderer, but the
test as written was essentially a no-op.

the problem didn't happen most of the time because we had
updated egl.cfg to not even list the software renderer.

the test as written didn't generate a compile-time error
because String8 has a const char* cast operator; but the
end result was to compare pointers instead of the string
itself.

http://code.google.com/p/android/issues/detail?id=54606

Change-Id: I739dd1c838fbc24c5643a631fae19713a8ef1717
2013-04-23 14:20:16 +02:00
Mathias Agopian
ed6d08b70d fix "traceGpuCompletion" debug feature
eglCreateSyncKHR requires a call to glFlush which we were not doing.
fixed by moving the code above eglSwapBuffers(), which both
fixes the problem and gives us a slightly better idea of when
the GPU is done drawing.

Change-Id: Ic826ef1fe25a6247742c3d49d0cb69f4031e3593
2013-04-16 16:41:47 -07:00
Ying Wang
8a0cb4ee0b Add liblog
Bug: 8580410
Change-Id: I2ca4fa00dde0b574df3619134836bcb9315bd506
2013-04-09 21:55:39 -07:00
Mathias Agopian
39c24a20bb fix local include paths
Change-Id: Icb921fa796ec08612dbb2feb7e7161bcb0cf4a99
2013-04-04 23:30:18 -07:00
Jesse Hall
441f69463e Fix MIPS assembly variable names to not conflict with GL API parameter names
Change-Id: I8e93fb55018de53a596cb176d48dbfdf1fd396e4
2013-03-30 23:22:19 -07:00
Mathias Agopian
86e392e9b3 Merge "don't use compile-time configuration of libgui as much as possible" into jb-mr2-dev 2013-03-29 23:31:23 +00:00
Mathias Agopian
ca08833d5e don't use compile-time configuration of libgui as much as possible
We now detect at runtime which sync features to use, which
allows us to remove a lot of the compile-time configuration
options. There  is still one option though, to disable
KHR_fence_sync on some devices (which are more efficient
without it).

- added a backdoor to get the vendor's EGL strings

the new logic is:
- use always ANDROID_native_fence_sync if available
- fallback to KHR_fence_sync if available and not disabled
  by the compile-time option
- use KHR_wait_sync if available and either of the above is
  enabled

Change-Id: I9c4b49d9ff1151faf902cc93bd53ea5f205aaabf
2013-03-29 15:33:47 -07:00