- 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
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
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
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
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
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
# By luliuhui
# Via Android Git Automerger (1) and others
* commit '873ab60e94811488caea1906eb98133329a3e28f':
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
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
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
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
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
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
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
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
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
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
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
This change updates the extension spec to refer to generic "native fence sync
objects" rather than "Android fence sync objects."
Change-Id: I15a79f08571586431845b54c58c8420b652f40ef
eglGetRenderBufferANDROID was removed as it had no users. This commit
reintroduces this extensions as it's used by Qualcomm graphics HAL.
Change-Id: I493306830a0d4f8722a42bcc84fb49236afdabeb
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
This fixes the glgen code generation for methods
which have a buffer arg that can be NULL.
Bug: 6845189
Change-Id: I5fb745b806601e5665f97bfd15fd865cd9c241ed
- 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>
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
This changes generation of the OpenGL bindings to prevent
crashes of methods with more then one nio buffer argument.
Bug: 6772416
Change-Id: I4eff25c2f568dea78a6ffd3e95ff4620ab4b3b7d
This fixes lighting when using point lights, when eye space
lighting is used (which is the default).
Change-Id: I0cd0d2329893d6b5f8af3b1e595274c2076fc322
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
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
this allows us to enable h/w acceleration on low-end
devices while keeping memory usage down.
Bug: 6557760
Change-Id: I8af2de3038dc2579360b8b73aa452cb7a0e506a9
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
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
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
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
This tests if eglTerminate can succeed while objects
are leaked. Currently the test fails because of a deadlock.
Change-Id: Ibe26edfda28691284d0674e803e8d3114f3ce4c6
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
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
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
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
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
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