Commit Graph

718 Commits

Author SHA1 Message Date
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
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
Siva Velusamy
9801142afb gltrace: Make code 64-bit safe.
Currently, the trace API passes the pointers that need to be
patched up via 32 bit integers. Such code will not be 64 bit safe.
This patch sends all pointers in a separate array of pointers
for the fixup calls to read from.

Change-Id: If975333f11a6f6f9a74fba57de328affaed452a5
2012-02-27 12:08:47 -08:00
Siva Velusamy
0128a6b819 Merge "gltrace: attach buffer data sent with glBufferData" 2012-02-27 07:41:38 -08:00
Mathias Agopian
5f2165f945 remove dependency on android_native{s_priv|buffer}.h
Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
2012-02-24 18:26:01 -08:00
Mathias Agopian
870b8aa15c remove libui dependency on libEGL
Change-Id: I1194f04085637d5c384e134967249430cc43b6ee
2012-02-24 16:42:46 -08:00
Siva Velusamy
9291da97cb gltrace: attach buffer data sent with glBufferData
Attach the buffer that is passed with glBufferData
and glBufferSubData to the proto buf.

Change-Id: I1b4c1172d405736b06cb0a356a6e241e1d60c4d5
2012-02-24 11:32:00 -08:00
Siva Velusamy
05df4504e5 gltrace: Trace thread time and wall clock time.
For each gl function, trace both the thread and wall clock
times.

Change-Id: I32b6caa67fa50bf915dab89b3c5021ee82e28d55
2012-02-17 11:09:47 -08:00
Mathias Agopian
3ac9473cb9 Merge "Don't wrap EGLImageKHR and EGLSyncKHR anymore" 2012-02-14 18:59:47 -08:00
Mathias Agopian
7c0441ac27 Don't wrap EGLImageKHR and EGLSyncKHR anymore
this simplify our EGL wrapper implementation a lot.
This wrapping is no longer needed now that we can only
support a single underlaying EGL implementation.

Change-Id: I8213df7ac69daac447f1fe6e37044b78aac4e9a9
2012-02-14 17:14:36 -08:00
Siva Velusamy
fefddbc181 Merge "gltrace: Patch up all glUniform*() calls." 2012-02-14 16:36:44 -08:00
Siva Velusamy
88e8e5a3f1 gltrace: Patch up all glUniform*() calls.
This patch updates the trace information for all glUniform*() calls
to have the right data (the actual uniforms that are passed).

In addition, as soon as a program is linked, information regarding
all the active attributes and uniforms is passed on to the debugger.

Change-Id: Icfbc6722789b42c413a845cf546577fa6de7da2b
2012-02-14 15:08:20 -08:00
Mathias Agopian
7773c435bc EGLConfig is now not remaped to an internal EGLConfig
this is possible now that we support only a single
EGL implementation. this allows a large code simplification.

Change-Id: I7a6b9db4c5d60f4407c6061e7a68729af63d5242
2012-02-13 20:23:15 -08:00
Mathias Agopian
ada798b7ca remove multiplexing of multiple EGL implementation
from now on, the system can only have one EGL
implementation. this means the software and h/w renderer
cannot be used at the same time on a device. Of course, the
h/w renderer is always prefered; in its absence we
default to the software renderer.

Change-Id: Ib579f58055dd0ce4c4a99144131efa11c16ca3d3
2012-02-13 18:11:42 -08:00
Mathias Agopian
a4b2c04182 fix a dead-lock in eglMakeCurrent
this was introduced in a recent change. eglMakeCurrent can
end up calling eglDestroyImageKHR via ANativewWindow::disconnect
when the consumer is in the same process.

we make sure we don't hold the lock while this is happening.

Change-Id: Id17fe4fd76eecf5f962cefb9aa32be41fc1b042d
2012-02-03 15:24:51 -08:00
Siva Velusamy
a7167f3647 gltrace: fixup Push & Insert Marker calls
Change-Id: I58ced7225fac79ec636a65da4883614a5dce6dff
2012-02-01 12:16:40 -08:00
Mathias Agopian
fb87e54a9a fix a race condition in eglMakeCurrent()
it would happen when a context was made non-current, in this
case we would call the implementation's eglMakeCurrent() which
would succeed, if we're rescheduled at that point, another
eglMakeCurrent() could make that context current to another thread,
however, when we came back to the original call we would
overwrite egl_context_t internal state.

this is fixed by moving the critical section under
egl_display_t's lock.

Change-Id: I743c85696e13263d3a9570824940263df0caacdc
2012-01-30 18:20:52 -08:00
Mathias Agopian
0d6aa287d1 Merge "add all needed GL extension wrappers" 2012-01-30 17:44:09 -08:00
Mathias Agopian
a6d86e5ea7 add all needed GL extension wrappers
when increasing MAX_NUMBER_OF_GL_EXTENSIONS to 256
we also needed to create all the corresponding wrappers.

Change-Id: I90edaaf0885ccdfab48e7a1396bcf88e039cfb25
2012-01-30 17:40:29 -08:00
Mathias Agopian
9e2464c4b9 Merge "add support for GL_EXT_debug_marker" 2012-01-30 15:23:47 -08:00
Siva Velusamy
b8c3914547 Merge "gltrace: Use Unix Domain Socket rather than INET Socket" 2012-01-30 09:08:27 -08:00
Mathias Agopian
48d438d05f add support for GL_EXT_debug_marker
This extension is always added to the GL_EXTENSIONS
extension string for the current GL context, regardless
of if it's supported by the h/w driver.

The extension itself will be handled by GLES_trace (eventually),
when GLES_trace is not enabled, it'll result to a no-op.

If the h/w implementation has this extension, we'll call that version
instead of our dummy version.

Change-Id: Ie5dd3387c4d45cd5ed5f03b73bda6045620a96bc
2012-01-29 22:22:09 -08:00
Mathias Agopian
453851f3a0 Merge "update GLES headers and add support for corresponding new extensions." 2012-01-29 22:03:19 -08:00
Mathias Agopian
3127260614 update GLES headers and add support for corresponding new extensions.
Change-Id: I554d9659113b4721b748ee5c1a3b1ca82b11d75e
2012-01-28 20:41:35 -08:00
Mathias Agopian
cf701aa9fe remove unused code
Change-Id: If900fcc50f9ffc424e270cb6063b16a2d7bc04d3
2012-01-28 18:47:13 -08:00
Siva Velusamy
0832fb6407 gltrace: Use Unix Domain Socket rather than INET Socket
Export trace information via abstract Unix Domain Socket (UDS).
This allows tracing of applications without INTERNET permission,
and should be faster as well.

Change-Id: Iabb67fcc2bc2484afd8128af07dca723b81c52c6
2012-01-27 17:24:18 -08:00