Commit Graph

422 Commits

Author SHA1 Message Date
Ben Clayton 16d7b6a8bb Don't try to capture the pointer when using PBOs for texture APIs
If a PBO is bound, then the pointer argument is a relative offset from
the start of the PBO, not an absolute address.

Fixes b/17063439

Change-Id: I39629ce6c9bb3cb6bac5c9b0311287628306ddd4
(cherry picked from commit 0ad707f2f3)
2014-08-20 15:21:44 +00:00
Michael Lentine 0ffbac894c am 45e2fc22: Revert "Modify EGL to disconnect the window when the surface gets destroyed."
* commit '45e2fc22261cb8ecac4901b4425bcb7352c71174':
  Revert "Modify EGL to disconnect the window when the surface gets destroyed."
2014-08-08 17:42:02 +00:00
Michael Lentine 45e2fc2226 Revert "Modify EGL to disconnect the window when the surface gets destroyed."
This reverts commit 843cbb241d.
2014-08-08 10:30:44 -07:00
Jesse Hall 83142a12fb am e2e17e5b: Merge "GlES2: Add NULL check"
* commit 'e2e17e5b238ccd214c72ec1a1864cf391425f09f':
  GlES2: Add NULL check
2014-08-06 17:22:52 +00:00
Anshuman Dani 0627071cc9 GlES2: Add NULL check
Check for NULL before calling thread specific glGetString.

CRs-fixed: 569609

Change-Id: Ifee8257152ba7ca7a05df5d7b113171b71d16c82
2014-08-06 21:53:35 +05:30
Michael Lentine cd36eb445b Merge "Modify EGL to disconnect the window when the surface gets destroyed." into lmp-dev 2014-07-25 21:16:23 +00:00
Michael Lentine 843cbb241d Modify EGL to disconnect the window when the surface gets destroyed.
Bug: 14445579

Change-Id: I1d263ff6cffcb6e448761fca7ca4b06466ad65aa
2014-07-29 18:59:56 -07:00
Ying Wang d1ceb8b78f Install symlinks in multilib build.
(cherry picked from commit c3aed1eaef)

Change-Id: Ic0082ffbd7ecf610476bccb0929e67427a05190d
2014-07-24 10:36:55 -07:00
Ying Wang c3aed1eaef Install symlinks in multilib build.
Change-Id: Ia8a4995de127c42beebb3fe603366ce29a6f94d3
2014-07-23 11:55:43 -07:00
Ben Clayton 7b3f48d2ef Use the count parameter to store all the uniform vectors, not just the first one. DO NOT MERGE.
Change-Id: Ib56d859051f0b895de5c12ffa371cd4b2b65ac0b
(cherry picked from commit 31b0aec64b)
2014-07-21 09:52:48 +00:00
Ben Clayton 3d3c125423 Add data capturing of glCompressedTexImage2D and glCompressedTexSubImage2D calls.
Change-Id: I38643f5d279a84f1b7069801d7c106fc8f1ae394
2014-07-07 11:57:45 +01:00
Jesse Hall 0d7271527f am 17cbadf0: am 6fa169fa: Merge "Add aarch64 EGL/GLES trampolines"
* commit '17cbadf0f598b0d02179262ad5b6b270850ccb94':
  Add aarch64 EGL/GLES trampolines
2014-06-07 00:19:53 +00:00
Jesse Hall 30a41aa1cc Add aarch64 EGL/GLES trampolines
Change-Id: Ia90e18d26ff3bdb7e643aff8d77cbaddd2ac2a03
2014-06-06 16:31:53 -07:00
Simon Wilson 7ef56b7315 am ad8d25e8: am 90654afb: Revert "Enable OMAP4 SGX workaround for OMAP3 too"
* commit 'ad8d25e812d8842298de92657158a0325c42cdbd':
  Revert "Enable OMAP4 SGX workaround for OMAP3 too"
2014-05-29 17:58:30 +00:00
Simon Wilson ad8d25e812 am 90654afb: Revert "Enable OMAP4 SGX workaround for OMAP3 too"
* commit '90654afb3aeac78916f2a53fe689a087c0e283c9':
  Revert "Enable OMAP4 SGX workaround for OMAP3 too"
2014-05-29 17:54:34 +00:00
Simon Wilson 90654afb3a Revert "Enable OMAP4 SGX workaround for OMAP3 too"
Since the new TI SGX DDK 1.12 has fixed support for RGBA8888,
the workaround can be reverted. This may help with CTS issues.

Bug: 14995811
This reverts commit 6e79cb81d0.

Change-Id: Id8160ebe577d7009d2dd5eb4501ec40356a4274d
2014-05-29 08:55:27 -07:00
Jesse Hall c2774f9b73 am 92374318: am 618c78c0: am dc273621: Merge "EGL: add x86/64 assembly code for EGL/GLES wrappers"
* commit '92374318b82945f3d03461f3d0c659adb8409fc5':
  EGL: add x86/64 assembly code for EGL/GLES wrappers
2014-05-27 23:35:10 +00:00
Jesse Hall 92374318b8 am 618c78c0: am dc273621: Merge "EGL: add x86/64 assembly code for EGL/GLES wrappers"
* commit '618c78c032ce84c02724a1e5a7f439fa788ecf3a':
  EGL: add x86/64 assembly code for EGL/GLES wrappers
2014-05-27 23:31:32 +00:00
mwajdecz c80aafa61d EGL: add x86/64 assembly code for EGL/GLES wrappers
There was no explicit support for x86/64 architecture in EGL/GLES wrappers.
This resulted either in failures or sub-optimal implementation of the wrapper functions.

Change-Id: I20d99d7372fbf642ee4b94a05c8cb971cba29988
Signed-off-by: Wajdeczko, Michal <michal.wajdeczko@intel.com>
2014-05-27 09:26:21 -07:00
Jesse Hall fca1b54031 opengl: Regenerate code with ES 3.1 and new extensions
Enable ES 3.1 generation in glgen.py, and regenerate everything to add
support for that as well as these new extensions in the registry:
- EXT_copy_image
- EXT_draw_buffers_indexed
- EXT_geometry_shader
- EXT_gpu_shader5
- EXT_primitive_bounding_box
- EXT_shader_implicit_conversions
- EXT_shader_io_blocks
- EXT_tessellation_shader
- EXT_texture_border_clamp
- EXT_texture_buffer
- EXT_texture_cube_map_array
- EXT_texture_view

Bug: 15028495
Change-Id: I3f45a7ef5367c70e54ce6b36a8c030ae11033434
2014-05-21 15:32:23 -07:00
Jesse Hall 3703f7f014 opengl: Update GLES headers and generate *.in from registry XML
Import GLES headers from Khronos SVN r26322:
https://cvs.khronos.org/svn/repos/registry/trunk/public/gles/api

There are many non-functional whitespace and parameter name changes
included here. These were introduced upstream when converting from the
old .spec registry to the new XML registry.

There are also some new extensions added. Unfortunately there isn't a
version of the XML that matches the headers the previous versions of
the *.in files were generated from, so I can't separate out the
non-functional changes from the new extensions (other than temporarily
hacking them out of the XML). See below for a list.

Finally, I had to hack the official glext.h. Khronos hasn't updated
the official GLES1 headers since switching to the XML registry, and
there is one critical difference: a "const void**" parameter in the
official header is "const void* const*" in the registry. I changed the
header to avoid build errors with code generated from the registry.

Dependencies on the *.in files required manually updating some
GLES_trace/ files as well:

- gltrace_api.{h,cpp} must be manually re-generated using
  tools/genapi.py.
- New GL prototypes must be manually added to gltrace.proto.
- gltrace.pb.{h,cpp} must be regenerated using aprotoc (see dev.make)

New GLES extensions in libs/GLES_CM/glext_api.in:
- GL_OES_byte_coordinates
- GL_EXT_map_buffer_range
- GL_APPLE_copy_texture_levels
- GL_APPLE_sync

New GLES2 extensions in libs/GLES2/gl2ext_api.in:
- GL_KHR_blend_equation_advanced
- GL_KHR_debug
- GL_OES_sample_shading
- GL_OES_texture_storage_multisample_2d_array
- GL_EXT_disjoint_timer_query
- GL_EXT_draw_buffers
- GL_EXT_draw_instanced
- GL_EXT_instanced_arrays
- GL_EXT_map_buffer_range
- GL_EXT_map_buffer_range
- GL_EXT_multiview_draw_buffers
- GL_EXT_separate_shader_objects
- GL_ANGLE_instanced_arrays
- GL_ANGLE_translated_shader_source
- GL_APPLE_copy_texture_levels
- GL_APPLE_sync
- GL_INTEL_performance_query
- GL_NV_blend_equation_advanced
- GL_NV_copy_buffer
- GL_NV_draw_instanced
- GL_NV_framebuffer_blit
- GL_NV_framebuffer_multisample
- GL_NV_instanced_arrays
- GL_NV_non_square_matrices

Bug: 15028495
Change-Id: I902517c23354e14f9c63b1584db286d682315bb5
2014-05-21 14:58:00 -07:00
Jesse Hall 0b96e6c44b Revert "opengl: Generate *.in from registry XML"
This reverts commit 4a73962c69.

Change-Id: I1fa5cbe4d0b86f6df69d616157b3fec68d706d7a
2014-05-20 21:38:44 +00:00
Jesse Hall 4a73962c69 opengl: Generate *.in from registry XML
There are many non-functional whitespace and parameter name changes
included here. These were introduced upstream when converting from the
old .spec registry to the new XML registry.

There are also some new extensions added. Unfortunately there isn't a
version of the XML that matches the headers the previous versions of
the *.in files were generated from, so I can't separate out the
non-functional changes from the new extensions (other than temporarily
hacking them out of the XML). See below.

Finally, I had to hack the official glext.h. Khronos hasn't updated
the official GLES1 headers since switching to the XML registry, and
there is one critical difference: a "const void**" parameter in the
official header is "const void* const*" in the registry. I changed the
header to avoid build errors with code generated from the registry.

Dependencies on the *.in files required manually updating some
GLES_trace/ files as well:

- gltrace_api.{h,cpp} must be manually re-generated using
  tools/genapi.py.
- New GL prototypes must be manually added to gltrace.proto.
- gltrace.pb.{h,cpp} must be regenerated using aprotoc (see dev.make)

New GLES extensions in libs/GLES_CM/glext_api.in:
- GL_OES_byte_coordinates
- GL_EXT_map_buffer_range
- GL_APPLE_copy_texture_levels
- GL_APPLE_sync

New GLES2 extensions in libs/GLES2/gl2ext_api.in:
- GL_KHR_blend_equation_advanced
- GL_KHR_debug
- GL_OES_sample_shading
- GL_OES_texture_storage_multisample_2d_array
- GL_EXT_disjoint_timer_query
- GL_EXT_draw_buffers
- GL_EXT_draw_instanced
- GL_EXT_instanced_arrays
- GL_EXT_map_buffer_range
- GL_EXT_map_buffer_range
- GL_EXT_multiview_draw_buffers
- GL_EXT_separate_shader_objects
- GL_ANGLE_instanced_arrays
- GL_ANGLE_translated_shader_source
- GL_APPLE_copy_texture_levels
- GL_APPLE_sync
- GL_INTEL_performance_query
- GL_NV_blend_equation_advanced
- GL_NV_copy_buffer
- GL_NV_draw_instanced
- GL_NV_framebuffer_blit
- GL_NV_framebuffer_multisample
- GL_NV_instanced_arrays
- GL_NV_non_square_matrices

Bug: 15028495
Change-Id: Ib3fa700a146adf7f1487a93e459b1e6df0dcdc42
2014-05-19 12:54:05 -07:00
Jesse Hall 38cd5c5b61 Remove vestigial remnants of GLES2_dbg
These are left over from an early (not finished?) GL debugging
facility that morphed into GLES_trace. Most of the rest of it has
already been removed, these few pieces were still hanging aroung.

Bug: 15028495
Change-Id: Ib7c03eb8d0db30112e1b83e5262bba03006770de
2014-05-17 19:32:32 -07:00
Jesse Hall bbbddb83bb Disable warnings when generating GL wrappers
Bug: 15028495
Change-Id: Ic0c974e868d05632a06748c90cedbdd409ce2aa8
2014-05-17 19:32:10 -07:00
Jesse Hall 4c0596f4cc Rationalize GLES2/3 .in files.
We weren't using gl2_api.in, since gl3_api.in was a superset. And
gl3ext_api.in was empty, and Khronos has decided to keep it that way
(any GLES2/3/... extensions will be in gl2ext.h).

Since libGLES2.so will have all future backwards-compatible GLES APIs,
it makes sense to just use gl2_api.in and gl2ext_api.in to build its
contents. This changes renames gl3_api.in to gl2_api.in and updates
uses of it, and removes gl3ext_api.in and references.

Bug: 15028495
Change-Id: I0745eda27ec91ee625f03e957e4fdb22035dd781
2014-05-17 19:31:48 -07:00
Ying Wang f736f2f5da am 114d71ce: am 214b4a61: am 8155ce81: Merge "Remove unused LOCAL_LDLIBS."
* commit '114d71ce7c6ec1ce0327c812a42966c4258b4a46':
  Remove unused LOCAL_LDLIBS.
2014-05-08 18:23:58 +00:00
Ying Wang 114d71ce7c am 214b4a61: am 8155ce81: Merge "Remove unused LOCAL_LDLIBS."
* commit '214b4a61ac3fa63e35c79157d3acf0d8b692b3ac':
  Remove unused LOCAL_LDLIBS.
2014-05-07 23:01:19 +00:00
Ying Wang 4a793fe952 Remove unused LOCAL_LDLIBS.
Change-Id: I62904c410a66f256da8253764577acae18f964f8
2014-05-07 15:26:38 -07:00
John Reck 6ec9862df1 Merge "Revert "Temporarily turn on callstack logging"" 2014-04-24 23:49:19 +00:00
John Reck 1f246d73d8 Revert "Temporarily turn on callstack logging"
Bug: 13927881

'twas useful and perhaps should be always enabled (please?)
but not like this, so reverting.

This reverts commit db4488565a.

Change-Id: I9a78c6d6e48342ef6ca1f2f7b5303ca47ccc6086
2014-04-24 23:35:26 +00:00
Jesse Hall 1034cfc778 am 43b3e600: am 3f0d5669: Merge "Expose core EGL entry points to eglGetProcAddress"
* commit '43b3e600c1a477697408b1cac4cbd40b0ad97d56':
  Expose core EGL entry points to eglGetProcAddress
2014-04-21 19:03:03 +00:00
Jesse Hall 43b3e600c1 am 3f0d5669: Merge "Expose core EGL entry points to eglGetProcAddress"
* commit '3f0d5669eb437ce1f9ce599e196d045534ec3d4f':
  Expose core EGL entry points to eglGetProcAddress
2014-04-21 18:57:12 +00:00
John Reck db4488565a Temporarily turn on callstack logging
Bug: 13745587
 Temporarily turn on callstack logging for gl_no_context() to
 try and track down font cache corruption

Change-Id: I657ee85e811746441c5ce0ffe5adbfb3fb011d4c
2014-04-08 15:05:54 -07:00
Michael Chock c0ec5e2333 Expose core EGL entry points to eglGetProcAddress
Required behavior for EGL_KHR_get_all_proc_addresses.

Change-Id: I1e6209ef3cb9f2fa6f22808b077c35139d4cb814
2014-03-27 17:28:40 -06:00
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
Keun-young Park ea116f1acb am 111d920b: am d3b2c029: Merge "[MIPS] Add MIPS architecture support to opengl framework"
* commit '111d920bb588669006bdd8699e786d6305f14c36':
  [MIPS] Add MIPS architecture support to opengl framework
2013-03-28 23:09:44 -07:00
Mathias Agopian 2bb716871c replace eglWaitSyncANDROID by eglWaitSyncKHR
Change-Id: I22f1b3588011c88389e249f738f1e6915cc97e72
2013-03-28 14:31:09 -07:00
Mathias Agopian e9b3dfb7d5 cleanup EGL extensions strings and entry-points
- move all the code related to EGL extensions in one place

- add missing extension strings:
   EGL_KHR_lock_surface
   EGL_KHR_reusable_sync

- add public extensions strings and entry-points
   EGL_ANDROID_wait_sync
   EGL_ANDROID_presentation_time

- add missing entry-points for EGL_KHR_reusable_sync

Change-Id: Ifd98966b549e8efd8ef5385eba0efde8c4cbc77b
2013-03-28 14:17:54 -07:00
Duane Sand 46b4253b76 [MIPS] Add MIPS architecture support to opengl framework
Change-Id: Id7704d35bed14d96a85dc1f29db0566cd03872b5
2013-03-28 12:09:36 -07:00
Mathias Agopian cab25d680e improved CallStack a bit
- added a ctor that updates and dumps the stack immediately
- added a "logtag" parameter to dump()

Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
2013-03-21 17:12:40 -07:00
Andy McFadden 7284145d56 Add eglPresentationTimeANDROID
Added EGL extension to set a timestamp on a surface.

Also, fix JNI encoding of "long" in glgen.

Bug 8191230

Change-Id: I38b7334bade3f8ff02bffe600bb74469ef22c164
2013-03-05 10:10:59 -08:00
Jesse Hall f5c7cb316c Merge changes Ic344ef63,If9bb02be,Ic8f94634
* changes:
  Symlink /system/lib/libGLESv3.so -> libGLESv2.so
  Add ES3 support to libGLESv2 and tracing tools
  Import OpenGL ES 3.0 headers from Khronos SVN
2013-02-24 00:18:56 +00:00
Jesse Hall 751402c866 Merge changes I45836219,I70a4075e
* changes:
  Regenerate API/trace files for constness change
  Import constness fix from gl3.h into gl2.h.
2013-02-23 04:56:32 +00:00
Elliott Hughes bbb7322c36 am 45b0e435: Merge "Simplify OpenGL TLS access on ARM."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '45b0e4350d3404bd194edc569e36ecca017c3d76':
  Simplify OpenGL TLS access on ARM.
2013-02-14 11:42:06 -08:00
Elliott Hughes 288870ebc3 Simplify OpenGL TLS access on ARM.
bionic now assumes the TLS register is available, so OpenGL can too.

Change-Id: If2b56a4c08de9f887759b78f70022026a181dc47
2013-02-13 17:30:54 -08:00
Jesse Hall 5ea4c73058 Symlink /system/lib/libGLESv3.so -> libGLESv2.so
The platform has a unified GLES2/GLES3 wrapper in libGLESv2.so, which
is what bundled binaries should link against. The NDK will have
separate GLES2 and GLES3 libraries so that applications will get a
link error if they accidentally use GLES3 entry points in a GLES2
application. This symlink allows GLES3 NDK apps to load using the
unified wrapper.

Change-Id: Ic344ef63c334047fccebb55b7cb2fb23a4c2d61b
2013-02-13 16:28:56 -08:00
Jesse Hall 4774338bd0 Add ES3 support to libGLESv2 and tracing tools
Since ES3 is backwards compatible with ES2, a new wrapper isn't
necessary, and the Khronos implementation guidelines recommend
supporting both versions with the same library.

Change-Id: If9bb02be60ce01cc5fe25d1f40c4e7f37244ebf6
2013-02-12 16:36:53 -08:00
Jesse Hall d58974c6b2 Regenerate API/trace files for constness change
Change-Id: I45836219fc0e97607d83d458de9babb44f4c7534
2013-02-11 16:12:49 -08:00
Alistair Strachan 7c95911157 Import constness fix from gl3.h into gl2.h.
This change has been made in Khronos SVN for GLES2 already, however it
is mildly controversial and discussion is on-going.

This change is necessary for Android because otherwise applications
cannot include both GLES2/gl2.h and GLES3/gl3.h as the glShaderSource()
prototype mismatches. Native programs may include framework headers
(which now include GLES3 headers only) but already have included GLES2
headers, creating an incompatibility.

Change-Id: I70a4075e079ee063e76cef5a227abb0ae70aebb4
2013-02-11 16:12:49 -08:00
Jesse Hall 2b6694f5f0 Force a specific locale for sorting
Avoids irrelevant output differences based on the user's locale. The
current output files were generated with a C or POSIX locale, and sort
differently under en_US.UTF-8.

Change-Id: I0dd85475e9ee2d58e7fa9fe2a4f86ad5c8142e00
2013-02-11 16:12:48 -08:00