Commit Graph

842 Commits

Author SHA1 Message Date
Mathias Agopian
54c2818abe update glgen to take into account recent changes
- it looks like UserId has been renamed to UserHandle in the
framework.
- also for some reason I don't understand glgen didn't seem
to be up to date with respect to the generated bindings in the tree.
It's like the bindings were generated with a more recent version of
glgen (maybe it was never checked in). So we fix that here.

Change-Id: Ie49522ebf67fcab9213246b4d93500e37a3cbc05
2013-02-22 20:04:22 -08:00
Mathias Agopian
e3c697fb92 Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
2013-02-14 19:19:05 -08: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
61d1b81213 Import OpenGL ES 3.0 headers from Khronos SVN
Add MODULE_LICENSE_MIT: The GLES headers use an MIT license or a
slight variant of it (the "SGI Free Software License B version 2.0",
http://oss.sgi.com/projects/FreeB/).

Change-Id: Ic8f946341cdd0d579f51b6f7a3ee109cd31b1691
2013-02-12 16:29:43 -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
Jesse Hall
519191670e am 873ab60e: am 75b83e4d: Merge "Gfx-3d: fix GetProcAddress in egl extention"
# By luliuhui
# Via Android Git Automerger (1) and others
* commit '873ab60e94811488caea1906eb98133329a3e28f':
  Gfx-3d: fix GetProcAddress in egl extention
2013-02-01 14:26:21 -08:00
Jesse Hall
873ab60e94 am 75b83e4d: Merge "Gfx-3d: fix GetProcAddress in egl extention"
# By luliuhui
# Via Gerrit Code Review (1) and Shuo Gao (1)
* commit '75b83e4dc7d8055a70e590f868f7307fdaf656a7':
  Gfx-3d: fix GetProcAddress in egl extention
2013-02-01 12:37:25 -08:00
luliuhui
69d100762c Gfx-3d: fix GetProcAddress in egl extention
This patch can fix issue when Proc address return NULL.
Glbench10, egl-ext and conformance test need this patch to run pass.

Change-Id: I275c7cb6f77cb334c3ee7fa23cd696bba1c5a458
Author: Liuhui Lu <liuhui.lu@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 52622
2013-01-22 15:14:34 +08:00
Siva Velusamy
582dbf82f9 Merge "gltrace: Add support for tracing running applications." 2012-12-20 10:52:00 -08:00
Siva Velusamy
a73a97728b gltrace: Add support for tracing running applications.
Currently, to activate OpenGL tracing, an application has to be
start with --opengl-trace option (or have a debug prop set).

This CL adds support for tracing an application which may already
be running. This is implemented as follows:
    - DDMS initiates a JDWP message to the VM indicating that
      opengl traces be enabled.
    - When that message is received, a flag is set that indicates
      that tracing should be enabled.
    - The trace flag is checked during every eglSwap() operation,
      and if it finds that tracing should be active and it isn't,
      then it starts the tracing component.

Change-Id: I3347fe89fc06c7404d7aa9360f4b21e5bf36ebcb
2012-12-20 10:38:47 -08:00
Jesse Hall
52f733c457 Merge "Merge extensions as published at khronos.org" 2012-12-19 14:07:09 -08:00
Andy McFadden
2adaf04fab Rename ISurfaceTexture and SurfaceTexture
The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
2012-12-18 13:10:48 -08:00
Jesse Hall
31134cd480 Merge extensions as published at khronos.org
No significant changes. The extensions now have assigned extensions
numbers. And Jon Leech added missing suffixes in the declaration of
eglSetBlobCacheFuncsANDROID; our header and code already had the
suffix.

Change-Id: I2faad8ebe0ca81b13e29729a15515ee6b17b94b2
2012-12-14 09:58:45 -08:00
Ying Wang
ac0de62ba3 Use LOCAL_REQUIRED_MODULES to establish dependency
instead of using the tricky order-only dependency on a phony target
module name.

Change-Id: I691f2d352d1bd7f619bdb0b75070709e1b8222c0
2012-12-04 12:04:44 -08:00
Jesse Hall
c342044368 Mark extensions 'Complete', correct some stale version info
Change-Id: I46ccd8eaeacc647399a5531e262c1b01e0a080b0
2012-11-29 16:13:10 -08:00
Jesse Hall
721192ed0d Initial draft of EGL_ANDROID_image_native_buffer
Change-Id: If9bdd27ffdb13fb85e9ef873b311d6721399f75f
2012-11-29 11:43:47 -08:00
Andy McFadden
db2e4f16bb am a90173d8: am 762a6d86: Merge "DO NOT MERGE - native_fence_sync: fix an enum name" into jb-mr1.1-dev
* commit 'a90173d86dd209aee55d833c73c424d854a98c70':
  DO NOT MERGE - native_fence_sync: fix an enum name
2012-11-27 11:39:20 -08:00
Andy McFadden
762a6d86de Merge "DO NOT MERGE - native_fence_sync: fix an enum name" into jb-mr1.1-dev 2012-11-27 07:36:50 -08:00
Jamie Gennis
378787cf62 DO NOT MERGE - native_fence_sync: fix an enum name
This change replaces all references to the "EGL_NO_NATIVE_FENCE_ANDROID" enum
with "EGL_NO_NATIVE_FENCE_FD_ANDROID".

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

(cherry-pick from master)

Change-Id: Ie25d4ab9721d8b69b8d4afcf18e902ef8e3ad911
2012-11-26 14:26:31 -08:00
Jamie Gennis
333fb79753 Merge "native_fence_sync: fix an enum name" 2012-11-26 14:12:12 -08:00
Jamie Gennis
e346c503ce native_fence_sync: fix an enum name
This change replaces all references to the "EGL_NO_NATIVE_FENCE_ANDROID" enum
with "EGL_NO_NATIVE_FENCE_FD_ANDROID".

Bug: http://code.google.com/p/android/issues/detail?id=40295
Change-Id: I049b2ba185c2dbdccb8fc069701dbe805d63f645
2012-11-26 13:54:56 -08:00
Siva Velusamy
0e34af6284 am c859084c: am a9a4cd48: gltrace: Make sure device is debuggable.
* commit 'c859084ca303ca1ab69bdc78f864d39c9c81ab0b':
  gltrace: Make sure device is debuggable.
2012-11-20 20:01:30 -08:00
Siva Velusamy
a9a4cd4806 gltrace: Make sure device is debuggable.
(cherry picked from commit 6482fa4db0)

Change-Id: I205aabcab1932025c12e7ba3d1b3cf94684f6758
2012-11-20 15:55:35 -08:00
Siva Velusamy
6482fa4db0 gltrace: Make sure device is debuggable.
Change-Id: Icc22ff823a2f56733b232b927dd1fa494e9e1e81
2012-11-20 13:39:57 -08:00
Ben Cheng
20b9749959 Disable ld --fatal-warnings because of using mktemp.
Change-Id: Id18b1e38672294b025bc26adb38aed0ac3e0fb45
2012-11-06 23:11:35 -08:00
Andrew Hsieh
16ac25b73a am 168dfe71: am 5e530e02: am a151a19d: Merge "Fix return type of glGetAttribLocation and glGetUniformLocation"
* commit '168dfe71bfafebaa26b6f75df553f5fad7607669':
  Fix return type of glGetAttribLocation and glGetUniformLocation
2012-11-06 20:46:17 -08:00
Andrew Hsieh
5e530e02bc am a151a19d: Merge "Fix return type of glGetAttribLocation and glGetUniformLocation"
* commit 'a151a19db2fa07295837027fb5d84c02401cc78d':
  Fix return type of glGetAttribLocation and glGetUniformLocation
2012-11-06 20:41:34 -08:00
Andrew Hsieh
300ad09822 Fix return type of glGetAttribLocation and glGetUniformLocation
from int to GLint.

See:
   http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetAttribLocation.xml
   http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetUniformLocation.xml

Change-Id: I4a9f8e9e34b8c3cca239ae84bfe8f3cdfd94802a
2012-11-06 14:39:08 -08:00
Romain Guy
d991b40739 am f58475b5: am 60393d45: Merge "Add runtime debugging capabilities to OpenGL" into jb-mr1-dev
* commit 'f58475b5ae4ccb3a31c05c79da8b2914c62a3510':
  Add runtime debugging capabilities to OpenGL
2012-10-18 17:39:13 -07:00
Romain Guy
f58475b5ae am 60393d45: Merge "Add runtime debugging capabilities to OpenGL" into jb-mr1-dev
* commit '60393d45207b6548e1f61ca104fa59aecee87d30':
  Add runtime debugging capabilities to OpenGL
2012-10-18 17:37:54 -07:00
Romain Guy
16928bfeca Add runtime debugging capabilities to OpenGL
The shell property debug.egl.trace can now be set to:

0
  disables tracing
1
  logs all GL calls
error
  checks glGetError after every GL call, logs a stack trace on error
systrace
  logs each GL call to systrace

Change-Id: I34a2a2d4e19c373fd9eaa1b0cd93e67c87378996
2012-10-18 16:16:10 -07:00
Romain Guy
4d0aec67c4 am 23bcd8d2: am 825a9a2d: Merge "Update comments to reflect what the code actually does" into jb-mr1-dev
* commit '23bcd8d298597659622919027c9ea921d5eed513':
  Update comments to reflect what the code actually does
2012-10-16 09:50:35 -07:00
Romain Guy
23bcd8d298 am 825a9a2d: Merge "Update comments to reflect what the code actually does" into jb-mr1-dev
* commit '825a9a2dcd1b3e139dd0677ff46f966fb23f963c':
  Update comments to reflect what the code actually does
2012-10-16 09:47:38 -07:00
Romain Guy
1ba2f61d75 am 49fe8add: am b96fe085: Merge "Add new debug option to force 4x MSAA in OpenGL ES 2.0 apps" into jb-mr1-dev
* commit '49fe8addbfe52bf9a3e69e6250e462a70332235c':
  Add new debug option to force 4x MSAA in OpenGL ES 2.0 apps
2012-10-15 20:26:14 -07:00
Romain Guy
49fe8addbf am b96fe085: Merge "Add new debug option to force 4x MSAA in OpenGL ES 2.0 apps" into jb-mr1-dev
* commit 'b96fe08540dcf7e90be56919ea9863f687da779c':
  Add new debug option to force 4x MSAA in OpenGL ES 2.0 apps
2012-10-15 20:19:18 -07:00
Romain Guy
be3c3e4eca Update comments to reflect what the code actually does
Change-Id: I2613aa32c29eddc52a00090656c1bd11f9f5732b
2012-10-15 19:25:18 -07:00
Romain Guy
1cffc80f97 Add new debug option to force 4x MSAA in OpenGL ES 2.0 apps
Change-Id: I53ac91a9ce07b5dd5f2ee0e3cc5b65b6402f9229
2012-10-15 18:13:05 -07:00
Siva Velusamy
c6e8452320 Merge "gltrace: Do not start gltrace from early_egl_init." 2012-10-10 14:02:55 -07:00
Chet Haase
8420c5fbe8 am 8b75830c: am 8d5d2019: Revert "Add GL Error logs (temporary)"
* commit '8b75830c5ce5e0097909c11c559d50d7f6f7303b':
  Revert "Add GL Error logs (temporary)"
2012-10-10 13:22:55 -07:00
Chet Haase
8b75830c5c am 8d5d2019: Revert "Add GL Error logs (temporary)"
* commit '8d5d2019805df1f27cbec07eeca47dd5ab453dad':
  Revert "Add GL Error logs (temporary)"
2012-10-10 13:21:39 -07:00
Chet Haase
8d5d201980 Revert "Add GL Error logs (temporary)"
This reverts commit 2da2c15068.
2012-10-10 13:10:40 -07:00
Siva Velusamy
2e080904ab gltrace: Do not start gltrace from early_egl_init.
The debugging and tracing levels are initialized both during
early_egl_init and egl_display_t::initialize(). For apps this has
no effect since early_egl_init is called in the context of zygote.
This CL removes the unnecessary call from early_egl_init.

Change-Id: Ibc55c26228cd197f2e2623fbfb2d1a63d0722401
2012-10-10 10:35:41 -07:00
Jean-Baptiste Queru
76942a4974 Merge "egl: Reintroduce eglGetRenderBufferANDROID" 2012-10-05 13:14:29 -07:00
Chet Haase
b39844e251 am 9c58d96f: am 27b28fd9: Merge "Add GL Error logs (temporary)" into jb-mr1-dev
* commit '9c58d96f0079e627004c606436df27fa97ff4c8e':
  Add GL Error logs (temporary)
2012-10-04 20:34:36 -07:00
Chet Haase
9c58d96f00 am 27b28fd9: Merge "Add GL Error logs (temporary)" into jb-mr1-dev
* commit '27b28fd9960b73a1f13e22dd6655f75e2e76eef7':
  Add GL Error logs (temporary)
2012-10-04 19:48:12 -07:00
Chet Haase
2da2c15068 Add GL Error logs (temporary)
Adding logs to tell which specific methods throw OpenGL errors.

Change-Id: I1d73c7566ed1ea6610392020411762c6255a0ede
2012-10-04 17:15:59 -07:00
Siva Velusamy
090503a01c gltrace: Fix NPE
Change-Id: Id7af9cd388f3508201f96a0624966c2ce01b4da5
2012-10-01 14:30:48 -07:00
Chet Haase
4cb9e0062e am bba6bb81: am 4c273277: Merge "Re-enable FAST_TLS in gl2 code" into jb-mr1-dev
* commit 'bba6bb81373b285b456bb851d37f7f2ecfc742ad':
  Re-enable FAST_TLS in gl2 code
2012-09-28 12:42:21 -07:00
Chet Haase
bba6bb8137 am 4c273277: Merge "Re-enable FAST_TLS in gl2 code" into jb-mr1-dev
* commit '4c2732779a11c92222958e7150162d4eaaab7b66':
  Re-enable FAST_TLS in gl2 code
2012-09-28 12:41:24 -07:00
Chet Haase
e8b0fac720 Re-enable FAST_TLS in gl2 code
Temporarily changed USE_FAST_TLS_KEY ifdef during debugging. Changing it
back now.

Change-Id: I7c2fcf7265b3d545e31ff7683bd7614100fad3e5
2012-09-28 11:56:48 -07:00
Romain Guy
f51c798c03 am e1549fcb: am cb094a78: Merge "New compile-time flags to make debugging easier for us poor souls Bug #7195815" into jb-mr1-dev
* commit 'e1549fcb4493fe84deb488d85fc626d635153eb8':
  New compile-time flags to make debugging easier for us poor souls Bug #7195815
2012-09-28 00:35:10 -07:00
Romain Guy
e1549fcb44 am cb094a78: Merge "New compile-time flags to make debugging easier for us poor souls Bug #7195815" into jb-mr1-dev
* commit 'cb094a783f14daae3378ac8aa7dc509980f037b2':
  New compile-time flags to make debugging easier for us poor souls Bug #7195815
2012-09-27 16:05:31 -07:00
Romain Guy
f12fe43e8c New compile-time flags to make debugging easier for us poor souls
Bug #7195815

Change-Id: I23e7ac991891b9586cb8ed20b1305c8b1b3e2b43
2012-09-27 15:47:10 -07:00
Mathias Agopian
b428bf60a3 am 2ac41948: am 1e83690c: Merge "assert -eng builds when calling a GL function without a context" into jb-mr1-dev
* commit '2ac4194854a70c6e319b1b3b647344e595082b38':
  assert -eng builds when calling a GL function without a context
2012-09-26 18:51:49 -07:00
Mathias Agopian
2ac4194854 am 1e83690c: Merge "assert -eng builds when calling a GL function without a context" into jb-mr1-dev
* commit '1e83690c6030b33c7776fa65cb57132d5e2d0b40':
  assert -eng builds when calling a GL function without a context
2012-09-26 18:50:13 -07:00
Mathias Agopian
455e360149 assert -eng builds when calling a GL function without a context
Bug: 7241626

Change-Id: I0f1f9361e75e9186af8cff8d98a7d2224b266765
2012-09-26 17:37:53 -07:00
Jamie Gennis
651d23e6f7 am 483ab742: am 2f45d746: Merge "EGL: add the EGL_ANDROID_framebuffer_target enum" into jb-mr1-dev
* commit '483ab74243870e6af4b8a947873556ff86d076c0':
  EGL: add the EGL_ANDROID_framebuffer_target enum
2012-09-24 18:25:05 -07:00
Jamie Gennis
f48bec48ea am ca5f79c2: am 363847d4: Merge "EGL: expose the EXT_create_context_robustness ext" into jb-mr1-dev
* commit 'ca5f79c2bb6c2e3995d9e2427f2600d1b03a84c4':
  EGL: expose the EXT_create_context_robustness ext
2012-09-24 18:25:04 -07:00
Jamie Gennis
483ab74243 am 2f45d746: Merge "EGL: add the EGL_ANDROID_framebuffer_target enum" into jb-mr1-dev
* commit '2f45d7464a55d7a91da6fcd6f8cf1b11e395d029':
  EGL: add the EGL_ANDROID_framebuffer_target enum
2012-09-24 18:23:05 -07:00
Jamie Gennis
ca5f79c2bb am 363847d4: Merge "EGL: expose the EXT_create_context_robustness ext" into jb-mr1-dev
* commit '363847d498bffe0e2d8e7b8aba693bb402513413':
  EGL: expose the EXT_create_context_robustness ext
2012-09-24 18:23:04 -07:00
Jamie Gennis
2f45d7464a Merge "EGL: add the EGL_ANDROID_framebuffer_target enum" into jb-mr1-dev 2012-09-24 18:21:14 -07:00
Jamie Gennis
363847d498 Merge "EGL: expose the EXT_create_context_robustness ext" into jb-mr1-dev 2012-09-24 18:20:51 -07:00
Mathias Agopian
73d2a39400 am 0d45d711: am 500407a2: log an error when eglCreateContext() fails in an inconsistant way
* commit '0d45d711976bdca1165536b8948680680d38eb6a':
  log an error when eglCreateContext() fails in an inconsistant way
2012-09-24 18:11:07 -07:00
Mathias Agopian
0d45d71197 am 500407a2: log an error when eglCreateContext() fails in an inconsistant way
* commit '500407a2c07ced40c36e7356574a47bcec9c2fd9':
  log an error when eglCreateContext() fails in an inconsistant way
2012-09-24 18:09:21 -07:00
Mathias Agopian
500407a2c0 log an error when eglCreateContext() fails in an inconsistant way
this will help debugging bug: 7216919

Change-Id: I54ac65f20c5ed55cc93a5cbc5350fadfb0fcb804
2012-09-24 17:57:48 -07:00
Mathias Agopian
68872cac38 am 81b316aa: am 98838aa0: am 77af25b6: Merge "Return back-end result from eglDestroyImageKHR"
* commit '81b316aa5395b6318ad4a10e1ed27d0b9b0df07f':
  Return back-end result from eglDestroyImageKHR
2012-09-24 15:45:56 -07:00
Mathias Agopian
81b316aa53 am 98838aa0: am 77af25b6: Merge "Return back-end result from eglDestroyImageKHR"
* commit '98838aa0836518b7397cbfe763f34305e3387a5f':
  Return back-end result from eglDestroyImageKHR
2012-09-24 15:43:54 -07:00
Mathias Agopian
77af25b6dd Merge "Return back-end result from eglDestroyImageKHR" 2012-09-24 14:56:03 -07:00
Jamie Gennis
3ff48e5e69 EGL: add the EGL_ANDROID_framebuffer_target enum
Change-Id: Id8b1b114e2a7a88956b857c63a0429e9b33fdb5c
2012-09-24 13:45:33 -07:00
Jamie Gennis
09b11432b6 EGL: expose the EXT_create_context_robustness ext
Change-Id: I1db43e96aa5e9e91a6176a4a3e5aa9d1f3ee4a7e
2012-09-24 13:45:32 -07:00
Jamie Gennis
6a2f058458 am 849df8cd: am e0606e29: Merge "Add a spec for EGL_ANDROID_framebuffer_target." into jb-mr1-dev
* commit '849df8cd6baa26ef431404d1b1eea1e141eb5030':
  Add a spec for EGL_ANDROID_framebuffer_target.
2012-09-24 00:48:43 -07:00
Jamie Gennis
aaf421c465 Add a spec for EGL_ANDROID_framebuffer_target.
This change adds a new extension for EGL implementations to indicate the
EGLConfigs that support use as a HWComposer framebuffer target layer.

Change-Id: Ia7c8fbe8da09d57b4ec8bf1d9ddb67ca21aa2885
2012-09-21 12:15:22 -07:00
Mathias Agopian
991c18586a am 278b3016: am 2a60824a: am 516efc1b: am 8a2b5423: Merge "libagl: Transform the vertex if using eye space lighting with point lights"
* commit '278b301690d5428e4ec97ac8cf2d9bfb8f901f0b':
  libagl: Transform the vertex if using eye space lighting with point lights
2012-09-20 09:29:13 -07:00
Mathias Agopian
2a60824abc am 516efc1b: am 8a2b5423: Merge "libagl: Transform the vertex if using eye space lighting with point lights"
* commit '516efc1bea1c05492c5d4636a589cfc686661842':
  libagl: Transform the vertex if using eye space lighting with point lights
2012-09-19 22:05:14 -07:00
Mathias Agopian
8a2b54235a Merge "libagl: Transform the vertex if using eye space lighting with point lights" 2012-09-19 19:31:53 -07:00
Jamie Gennis
7d33bc5588 am 8e7e5399: am f0f56f32: Merge "EGL: fix an extension string bug" into jb-mr1-dev
* commit '8e7e5399764c4ef44125c41b172a04dd1403d3a0':
  EGL: fix an extension string bug
2012-09-18 00:10:46 -07:00
Jamie Gennis
a08cf6e3a4 EGL: fix an extension string bug
This change fixes a bug where initializing EGL multiple times (eglTerminate
followed by eglInitialize) would cause extensions to show up in the extension
string multiple times.

Change-Id: I707a3da62ed30ef13835087167f84a08bc6addd7
2012-09-17 17:23:29 -07:00
Jamie Gennis
29821a3010 am 688115bb: am e45b01f5: Merge "EGL: make max cache key size BoardConfig-able" into jb-mr1-dev
* commit '688115bbd75416d0c665e8a922223bbf8742edc0':
  EGL: make max cache key size BoardConfig-able
2012-09-13 03:21:40 -07:00
Steven Holte
646a5c593f Return back-end result from eglDestroyImageKHR
Change-Id: I0e972b778f9802c28f52092bb9af087285833e0b
2012-09-12 15:14:55 -07:00
Michael Chock
0673e1e2d7 Additional parameter validation for EGL functions
Change-Id: I841d005647559799edbc2c4824c61ea5791cf893
2012-09-12 15:13:16 -07:00
Jamie Gennis
f478e6d18c EGL: make max cache key size BoardConfig-able
This change makes the maximum EGL blob cache key size configurable via a
BoardConfig.

Change-Id: Ic669cd25fc743662bd4f13aab62354fc3d54560c
2012-09-12 11:59:24 -07:00
Jamie Gennis
db28e00184 am 26606ba0: am 010dd4fb: EGL: Add the EGL_ANDROID_wait_sync extension
* commit '26606ba0a0409c6ebc2e4b070f96c8d19743e260':
  EGL: Add the EGL_ANDROID_wait_sync extension
2012-09-10 17:15:12 -07:00
Jamie Gennis
010dd4fb89 EGL: Add the EGL_ANDROID_wait_sync extension
Change-Id: Ie9a78e07fcaf27c5c13797141ad3c692217607fb
2012-09-09 17:52:18 -07:00
Jamie Gennis
1d137fb623 am 0a8e3367: am 331841b9: EGL: add the native_fence_sync extension
* commit '0a8e33679240df2c7746eb5adf05d90265d3111c':
  EGL: add the native_fence_sync extension
2012-09-06 16:15:55 -07:00
Jamie Gennis
331841b96b EGL: add the native_fence_sync extension
This change adds support for the EGL_ANDROID_native_fence_sync extension to the
Android EGL layer.  It also fixes a couple minor issues with the extension spec.

Change-Id: Ic8829d21f37b701f33aa9c72c3d25e88e03fa3cd
2012-09-06 16:11:37 -07:00
Jamie Gennis
d3b8840a13 am 2ec08f82: am 8893d5bb: EGL_ANDROID_native_fence_sync: fix the version
* commit '2ec08f825ff4ffa120b13272f575a179517636ce':
  EGL_ANDROID_native_fence_sync: fix the version
2012-09-06 15:02:02 -07:00
Jamie Gennis
8893d5bba1 EGL_ANDROID_native_fence_sync: fix the version
Change-Id: Ib43b8fec8f37bb847d7bcdbf7607fd56f19a0563
2012-09-05 19:46:34 -07:00
Jamie Gennis
111d71a905 am 6d53451b: am f42449e1: Merge "EGL_ANDROID_fence_sync: make it more generic" into jb-mr1-dev
* commit '6d53451b038591c57c0743ef4b5649d4e9240c45':
  EGL_ANDROID_fence_sync: make it more generic
2012-09-05 13:54:13 -07:00
Jamie Gennis
a1d49ce1f1 EGL_ANDROID_fence_sync: make it more generic
This change updates the extension spec to refer to generic "native fence sync
objects" rather than "Android fence sync objects."

Change-Id: I15a79f08571586431845b54c58c8420b652f40ef
2012-09-04 19:49:51 -07:00
Bjorn Andersson
f9752cc4cf egl: Reintroduce eglGetRenderBufferANDROID
eglGetRenderBufferANDROID was removed as it had no users. This commit
reintroduces this extensions as it's used by Qualcomm graphics HAL.

Change-Id: I493306830a0d4f8722a42bcc84fb49236afdabeb
2012-08-27 18:38:35 -07:00
Jean-Baptiste Queru
9024417a27 am ada50888: am 0adc8f26: am 6e820eec: am 6f89ebde: Merge "EGL: do not use sparse files for shader"
* commit 'ada508884284f9cd2025f683dd4ac4c66a1ffc08':
  EGL: do not use sparse files for shader
2012-08-20 09:47:25 -07:00
Jean-Baptiste Queru
0adc8f2600 am 6e820eec: am 6f89ebde: Merge "EGL: do not use sparse files for shader"
* commit '6e820eec21917f8e25c40dbc8b972468535af0e8':
  EGL: do not use sparse files for shader
2012-08-20 09:42:32 -07:00
Siva Velusamy
2fca168951 am 0bbd95b9: am c21fc05a: Merge "gltrace: flush trace buffer on createContext & makeCurrent" into jb-mr1-dev
* commit '0bbd95b9beece22fe7f833e6def244e39536a95e':
  gltrace: flush trace buffer on createContext & makeCurrent
2012-08-16 16:31:31 -07:00
Siva Velusamy
ad9693f4f0 gltrace: flush trace buffer on createContext & makeCurrent
Certain apps (e.g. chrome) seem to create contexts which are unused
for long periods of time. If tracing is stopped before those contexts
are used, then the debugger never gets to know that these contexts
were created. Flushing the trace after these calls ensures that
the debugger knows about all created/used contexts.

Change-Id: I01baa11aa56ac89eddce3c2851e4bf01076984d1
2012-08-16 14:41:20 -07:00
Jesse Hall
b4b138abaa am b58c6d5e: am 7e5099a9: Add compile-time option to systrace GL-ES calls
* commit 'b58c6d5ef1edcb04849d30f9b981a5f4bfd163e3':
  Add compile-time option to systrace GL-ES calls
2012-08-13 12:16:08 -07:00
Jesse Hall
7e5099a9ec Add compile-time option to systrace GL-ES calls
Change-Id: Ibec103bbf159626ad9745d0e071192ad424bc0e9
2012-08-13 12:13:05 -07:00
Thomas Tafertshofer
62a0a2a8ca Updated eglCreateWindowSurface stub for glgen
Updates the stub for eglCreateWindowSurface
to accept Surface as a native window.

Change-Id: I9ff7f68ad9ae4ff10439588aaef138b4564d959e
2012-08-09 11:30:58 -07:00
Keun young Park
a610da900c Merge "enable java/jni build in PDK if supported" into jb-mr1-dev 2012-08-08 12:25:15 -07:00
Keun young Park
203a3357c7 enable java/jni build in PDK if supported
- testFramerate requires platform java API
  while all other tests only need SDK support

Change-Id: Iaefe23c41b3ace87522b5deefd6db2f5d80ed872
2012-08-07 17:09:19 -07:00
Jesse Hall
b685c54283 Changes to support multi-display HWC
Change-Id: I07efff54f2980dcb013935747b03e099b8f1181b
2012-08-07 12:16:36 -07:00
Jesse Hall
bc0d7dc8f5 Revert "Minimal changes to support multi-display HWC"
This reverts commit bddd724b17

Change-Id: Ib7db20b5b3de4779b6e173473a33976ae398abd4
2012-07-31 12:16:31 -07:00
Jesse Hall
bddd724b17 Minimal changes to support multi-display HWC
Change-Id: I5efea78ac381c3e3118e6e92b508f336233ac319
2012-07-27 10:28:36 -07:00
Thomas Tafertshofer
36b285eac9 Fixed bug in opengl es binding generation
This fixes the glgen code generation for methods
which have a buffer arg that can be NULL.

Bug: 6845189
Change-Id: I5fb745b806601e5665f97bfd15fd865cd9c241ed
2012-07-23 17:06:52 -07:00
Mathias Agopian
493c4feb75 Merge "glgen stubs to fix bad methods in gles20 bindings" 2012-07-23 16:25:44 -07:00
Jamie Gennis
9a82fe645d Merge "Update the EGL_ANDROID_fence_sync spec." 2012-07-23 16:21:58 -07:00
Jamie Gennis
648654d741 Update the EGL_ANDROID_fence_sync spec.
Change-Id: I26589e51c2023aed4da8a25a098b01804200ddc2
2012-07-23 14:34:10 -07:00
vijay gupta
a30cc7db8d EGL: do not use sparse files for shader
- Process is killed by system with SIGBUS signal if it writes
  data to mapped sparse file on full filesystem.
- Allocate space using write() function instead of ftruncate()
  to avoid creation of sparse files on full filesystem.
  Catch write() errors to handle out-of-space case during allocation.

Bug: http://code.google.com/p/android/issues/detail?id=35376
Change-Id: Ifc366454f34e71a43a0973eda4f591a920ea3a14
Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
2012-07-23 14:26:57 +03:00
Thomas Tafertshofer
55b4e553c8 glgen stubs to fix bad methods in gles20 bindings
this adds correct versions of the broken GLES20 methods
glGetShaderSource, glGetActiveAttrib and glGetActiveUniform.
the old broken methods are still there and need to be @hide later.

Bug: 6006380
Change-Id: Ide74242ada54b85459b459ae4f20cd26a23c7610
2012-07-19 16:58:40 -07:00
Mathias Agopian
df5cbd7622 Merge "OpenGL bindings fix for methods with iobuffer args" 2012-07-18 18:31:41 -07:00
Thomas Tafertshofer
c5ee93e5fe Remove @hide from the generated EGL 1.4 API
Change-Id: Ia5707533fcf1186ef648b8a4e25987f5e7e7dea3
2012-07-13 17:43:19 -07:00
Thomas Tafertshofer
e58a97b5d7 OpenGL bindings fix for methods with iobuffer args
This changes generation of the OpenGL bindings to prevent
crashes of methods with more then one nio buffer argument.

Bug: 6772416
Change-Id: I4eff25c2f568dea78a6ffd3e95ff4620ab4b3b7d
2012-07-12 11:23:02 -07:00
Martin Storsjo
d5b1cda91e libagl: Transform the vertex if using eye space lighting with point lights
This fixes lighting when using point lights, when eye space
lighting is used (which is the default).

Change-Id: I0cd0d2329893d6b5f8af3b1e595274c2076fc322
2012-07-12 16:59:20 +03:00
Thomas Tafertshofer
66a42db8cb improve glgen tool to support EGL1.4
- added EGL1.4 bindings generation
- fixed bugs in GLES bindings

Bug: 6709865
Change-Id: I04ac63f652e1968a51eb833f47e00336ea449980
2012-07-10 15:49:43 -07:00
Jamie Gennis
d8e812ce6f Update ANativeWindow clients for sync
This change updates the uses of ANativeWindow to use the new ANW functions that
accept and return Sync HAL fence file descriptors.

Change-Id: I3ca648b6ac33f7360e86754f924aa072f95242f6
2012-06-20 15:48:30 -07:00
Jesse Hall
5880cc5738 Add support for HWC_DEVICE_API_VERSION_1_0
The acquire and release fences aren't yet used; this is just support
for the new version and temporary backwards compatibility for older
versions.

Change-Id: Ia5ccc05a97c86f649042b9a35e11042fa0187e84
2012-06-14 12:35:32 -07:00
Mathias Agopian
fe6102f07c Merge "don't error out when eglTerminate()ing an already terminated display" 2012-06-13 16:27:54 -07:00
Mathias Agopian
fe98127eaa don't error out when eglTerminate()ing an already terminated display
so says the EGL specification, section 3.2

Change-Id: Ice60530f8f6e47b4e14e06d2ab8eba799a7688a6
2012-06-13 15:21:21 -07:00
Mathias Agopian
4b3e4ae045 am 1d2eb663: am 2d15fcab: Merge "reduce PB size from 2MB to 512KB" into jb-dev
* commit '1d2eb663ef5cf69aa852045c8a1c1807dfa7039e':
  reduce PB size from 2MB to 512KB
2012-06-12 13:15:10 -07:00
Siva Velusamy
3ef9e9671c gltrace: Fixup vertex attrib pointers only for GLES2
Change-Id: Ibf280c2a4372ce6e598e164eef0d72b7c0a6d1c2
2012-06-11 11:16:56 -07:00
Mathias Agopian
d75f84d641 reduce PB size from 2MB to 512KB
this allows us to enable h/w acceleration on low-end
devices while keeping memory usage down.

Bug: 6557760
Change-Id: I8af2de3038dc2579360b8b73aa452cb7a0e506a9
2012-06-05 21:44:43 -07:00
Jamie Gennis
1401ad526c Add the EGL_ANDROID_fence_sync spec.
Change-Id: I8c26e5caaf8d89a60a09a5308d55e336537b916e
2012-05-30 16:34:32 -07:00
Jesse Hall
83e7c8c431 Implement the EGL_KHR_fence_sync in libagl
Implementing this in libagl allows us to start using it for
SurfaceTexture in emulator builds, which is necessary to avoid
corruption in the Browser when using the host-accelerated GL path.

Bug: 6515813
Change-Id: Icafba8687cb5d010d8d42b3866b298d2be984fc9
2012-05-22 12:11:41 -07:00
Mathias Agopian
cc2b1560e8 fix EGL_CLIENT_STRING
it should read OpenGL_ES (with an underscore)

Bug: 6529643

Change-Id: I7caf07793bffe5a8dcceaff496a222077486fc87
2012-05-21 14:02:53 -07:00
Siva Velusamy
2fdcc81ddf gltrace: Allow receiving commands of length > 4
Currently, gltrace offers very few trace collection options. As a
result, these options are encoded in a single integer. The trace
control task simply receives integers and interprets them as
commands.

This patch changes the control protocol to first receive the
command length followed by the actual command itself. This allows
for future flexibility to provide enable other commands.

Change-Id: Id5f56c80a025bbbe7613ab4457e092732e7d9dc9
2012-05-16 12:00:24 -07:00
Jesse Hall
201f3b2da5 Disable EGL hibernation due to jank
Hibernating EGL takes a long time (>100 ms) and blocks all other
rendering. During window animations, the outgoing activity begins
hibernation before the animation stops, causing visible stutter.
Hibernation is still available by setting 'BOARD_ALLOW_EGL_HIBERNATION
:= true' in the devices BoardConfig.mk

Change-Id: Iab4e00723a1adcd97481e81b2efdc821b3e9712f
2012-05-04 15:21:35 -07:00
Siva Velusamy
c7d767ad57 gldebugger: Allow connections from root user
Change-Id: I26ce670ae93c43bd36843576e824a9d7acea644d
2012-04-26 09:07:41 -07:00
Mathias Agopian
4a8111bc8c Merge "Added an EGLTest for eglTerminate" 2012-04-19 17:22:48 -07:00
Jesse Hall
a0fef1c8bb Fix deadlock when cleaning objects in eglTerminate
When eglTerminate() is called with a window surface still exists, a
deadlock would occur since egl_display_t::terminate() holds a lock
while destroying the window surface, which calls
onWindowSurfaceDestroyed() which attempts to take the same lock.

This change refactors the hibernation code and data into a separate
object with its own lock, separate from the egl_display_t lock. This
avoids the deadlock and better encapsulates the hibernation logic.

The change also fixes a bug discovered incidentally while debugging:
hibernating after calling eglTerminate() succeeds, but will cause
awakens from subsequent eglInitialize() to fail. We will no longer
hibernate a terminated display.

Change-Id: If55e5bb603d4f8953babc439ffc8d8a60af103d9
2012-04-17 14:52:13 -07:00
Daniel Lam
1cbcb98a25 Added an EGLTest for eglTerminate
This tests if eglTerminate can succeed while objects
are leaked.  Currently the test fails because of a deadlock.

Change-Id: Ibe26edfda28691284d0674e803e8d3114f3ce4c6
2012-04-16 22:25:13 -07:00
Jesse Hall
258385978c Hibernate the EGL implementation when idle
If the EGL implementation supports the EGL_IMG_hibernate_process
extension, use it to hibernate (and hopefully release memory or other
resources) when the process isn't actively using EGL or OpenGL ES. The
idleness heuristic used in this change is:

(a) Wake up when entering any EGL API call, and remain awake for the
    duration of the call.
(b) Do not hibernate when any window surface exists; this means the
    application is very likely in the foreground.
(c) Do not hibernate while any context is made current to a thread.
    The app may be using a client API without the EGL layer knowing,
    so it is not safe to hibernate.
(d) Only check these conditions and attempt to hibernate after a
    window surface is destroyed or a thread's context is detached. By
    not attempting to hibernate at the end of every EGL call, we avoid
    some transient wakeups/hibernate cycles when the app is mostly idle,
    or is starting to become active but hasn't created its window
    surface yet.

On a Galaxy Nexus, hibernating frees 1567 VM pages from the process.
Both hibernating and waking can take anywhere from 30ms to over 100ms
-- measurements have been very inconsistent.

Change-Id: Ib555f5d9d069aefccca06e8173a89625b5f32d7e
2012-04-09 21:36:17 -07:00
Jesse Hall
b29e5e8c26 Increment/decrement a counter around EGL calls
This is in preparation for a change that will hibernate the underlying
EGL when idle. Instead of a bare egl_display_t*, get_display() now
returns a egl_display_ptr, which acts like a smart pointer. The
"wakecount" counter managed by the smart pointer isn't used for
anything in this change. It will be used to make sure we don't
hibernate when any thread is in an EGL call, without having to hold a
mutex for the duration of the call.

Change-Id: Iee52f3549a51162efc3800e1195d3f76bba2f2ce
2012-04-09 21:35:17 -07:00
Jamie Gennis
28ef8d7911 EGL: add GPU frame completion tracing
This change adds a debug option to EGL to use an EGLSyncKHR each frame to
determine when the GPU finishes rendering the frame.

Change-Id: I09ce071db904b44f07ca814c586c291c8b59385a
2012-04-06 09:23:13 -07:00
Colin Cross
bb67556871 Merge "frameworks/native: prevent some opengl tests from building in pdk" 2012-03-27 10:28:58 -07:00
Colin Cross
9f64c2a9e4 frameworks/native: prevent some opengl tests from building in pdk
Some of the tests in frameworks/native/opengl/tests depend on java
or jni, and shouldn't be in frameworks/native.  Prevent them from
building in pdk builds for now.

Change-Id: Ie7a012513dd03992ac1f093bd245aeca826c9cb9
2012-03-26 16:01:43 -07:00
Mathias Agopian
7db993a98b debug.egl.finish can be used to force a glFinish() when eglSwapBuffers() is called
this debug property is evaludated at eglInitialize() time.

Change-Id: Ie439e4aac87f7fdc6ab2add86183d6d042f3ee8b
2012-03-25 00:49:46 -07:00
Mathias Agopian
b0e76f456a remove dependency of EGL on ndk header
Change-Id: Ia6e489b5b4f028864bdf54923e81f604710dd8ad
2012-03-23 14:15:44 -07:00
Siva Velusamy
8e2f3858d5 gltrace: Only accept connections from the shell.
Only accept incoming connections from the shell user.

Change-Id: Ibef1a796d794d45f73db59949b39cb1ce68542b4
2012-03-15 16:41:35 -07:00
Siva Velusamy
b13c78f852 gltrace: Expose a function to set OpenGL trace level.
This patch adds a function setGlDebugLevel() to libEGL to enable
GL tracing. This will be used by the Java layer to add an option
to "am start" that can enable tracing for a particular application.

Change-Id: Ie1dbdd550f502df8633553595cb33ee9d9ae44e1
2012-03-09 16:43:48 -08:00
Mathias Agopian
373c2b2869 fix include path
Change-Id: I84adf53594cd4083a4a8ab475f175abb7414cda5
2012-03-07 19:46:57 -08:00
Siva Velusamy
2178dcf149 Merge "gltrace: Send vertex attribute data after glDraw() call." 2012-03-06 08:59:32 -08:00
Mathias Agopian
622cfadc8f fixup include paths
- remove unneeded include deps
- remove some hardcoded include paths

Change-Id: Ifae0e2b2d738e0f94f8525c45be78f4227ce1673
2012-03-05 15:59:38 -08:00
Siva Velusamy
50129e4ae2 gltrace: Send vertex attribute data after glDraw() call.
This patch enables tracing of vertex attribute data that
is specified using glVertexAttribPointer().

At the time the glVertexAttribPointer() call is made, we
only receive a pointer in client space, without any indication
of the size (# of attributes). This size is known only at
the time of the glDraw() call.

This patch generates a new message glVertexAttribPointerData()
when a draw call is issued that contains the vertex attribute
data.

A glDrawArrays() call directly gives the size of data to copy.
A glDrawElements() call gives the indices to copy. In such a
case, all data between the min & max indices drawn are copied
and sent to the host. To support glDrawElements() with an
element array buffer, this patch also adds state that maintains
a copy of all element array buffers.

Change-Id: I434da794a0aa9ada8e7474e219ffb1d79b183ecf
2012-03-01 17:41:53 -08:00
Jamie Gennis
1c8e95cf86 Add tracing to various graphics components.
This change adds ATRACE call tracing to BufferQueue,
SurfaceTextureClient, SurfaceTexture, SurfaceFlinger, Layer, and EGL.

Change-Id: I9d75ed26f5a3f0d1af635da38289520134cfbbb7
2012-02-27 17:50:35 -08:00
Mathias Agopian
864d2afbb3 libagl shouldn't export anything
Change-Id: Ia823dbc56aab2a0b8a6063df4348fe6baac124c6
2012-02-27 13:03:04 -08:00
Siva Velusamy
640579b736 Merge "gltrace: Make code 64-bit safe." 2012-02-27 12:31:01 -08:00