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: I35acb473cba2433b9aeb95d1b8bfbdcfadf22532
This extension hasn't been published yet, so it isn't in the public
registry. That will change before the next platform release to AOSP.
Bug: 15028495
Change-Id: Iadafe0f776b5b9be4f81c4279a89c57ae02293e4
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
Someone fixed these in the generated code, so re-generating even with
no other changes caused diffs. Better to just fix it at the source.
Bug: 15028495
Change-Id: I248f9796d4e3d904c4c0dc15be5f8de231df7285
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
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
Bug: 13927881
'twas useful and perhaps should be always enabled (please?)
but not like this, so reverting.
This reverts commit db4488565a.
Change-Id: I9a78c6d6e48342ef6ca1f2f7b5303ca47ccc6086
Bug: 13745587
Temporarily turn on callstack logging for gl_no_context() to
try and track down font cache corruption
Change-Id: I657ee85e811746441c5ce0ffe5adbfb3fb011d4c
These tests call android_createDisplaySurface() to get a
FramebufferNativeWindow that is passed to EGL. This relies on the
existence of the framebuffer HAL, which is not supported on many
recent devices.
This change adds a new "window surface" object that the tests
can use to get a window from SurfaceFlinger instead. All tests
except for the HWC tests now appear to do things.
The HWC tests don't do anything useful, but they no longer depend
on the android_createDisplaySurface() function.
Bug 13323813
Change-Id: I2cbfbacb3452fb658c29e945b0c7ae7c94c1a4ba
EGLObjectHandle.<init>(int) and int EGLObjectHandle.getHandle()
have now been deprecated and replaced with variants that take
and return java longs.
bug: 13181704
Change-Id: Ie88e591c288d6de5655364b4cd673f61cce68d7d
This will allow eglGetDisplay(int) to work on both 32-bit
and 64-bit systems when EGL_DEFAULT_DISPLAY is passed as
a parameter.
Change-Id: I0d7e9ca5410b0dd893eacc02aac40956908e4f25
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
EGL classes in frameworks/base have to be updated to support
64-bit platforms. Key changes in the EGL classes include
[x] EGLObjectHandle class - EGLObjectHandle class has two public
methods (constructor and getHandle) that assume handles are
32-bit. They have not been changed. Instead, two new hidden
methods (EGLObjectHandle(long) and getNativeHandle) have been
added.
[x] EG14 class - Two public methods eglGetDisplay and
eglCreatePbufferFromClientBuffer assume that handles are 32-bit.
They have been changed to throw unsupported operation exception
on non 32-bit machines. Two new methods eglGetDisplay(long)
and eglCreatePbufferFromClientBuffer(...long buffer..) have
been added to support 64-bit handles.
To allow the above changes in frameworks/base EGL classes,
corresponding code generation mechanism in frameworks/native has
been updated.
Change-Id: I5d0a62e10c20ccf05f610d6608b8dfb6414b5116
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Patch from synergydev with commit-id 01994c79 changed
core/jni/com_google_android_gles_jni_GLImpl.cpp in the
frameworks/base. However the corresponding code snippet
in frameworks/native was not updated. This patch addresses
the issue.
Change-Id: I89c3d88de832efc8cbbe682c8a7ff7dfbef99db3
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Patch from Takeshi Aimi with commit-id f9337377 changed
core/jni/android_opengl_EGL14.cpp in the frameworks/base.
However the corresponding code snippet in frameworks/
native was not updated. This patch addresses the issue.
Change-Id: I40bcc43d36d7ab4e0db4a73556a4f7480c7431c1
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
They were replaced with correct bindings a while back, but the
broken methods weren't hidden.
Also, pick up two changes that were made to the generated code
rather than the source.
Bug 6006380
Change-Id: Ibfe9a5f2e13e745f8d82116d1b4d8c2d025ac830
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
Fix size of vertex_t on 64-bit architectures
Fix __get_tls casts, the TLS area is a void**
Cast through uintptr_t to store integers in a pointer
Use %zu to print size_t
Change-Id: I91079ec76025237e6d2081784c5348518b0ce122
The previous message indicated that the fault was due to an already-
connected window, which was misleading at times.
Bug 12439318
Change-Id: I1e0a042673dd245d1b0d237af963c52946803eb6
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
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
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
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
this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that
Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
While currently untested, this should allow to move the
BuffereQueue in the consumer process and have everything
work as usual.
Bug: 9265647
Change-Id: I9ca8f099f7c65b9a27b7e7a3643b46d1b58eacfc
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
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
this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:
- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
those flags are used to put the BufferQueue in a mode where it
will never block if both flags are set. This is achieved by:
- returning an error from dequeueBuffer() if it would block
- making sure a buffer is always available by replacing
the previous buffer with the new one in queueBuffer()
(note: this is similar to what asynchrnous mode used to be)
Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.
Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
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
This allows apps to find OpenGL ES 3.0 functions using
eglGetProcAddress() instead of dlopen/dlsym.
Bug: 9681677
Change-Id: I7ce6e1636bc47d6b0bf20a4e46bd67235714d129
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
Make it faster and correcter.
Also, fixed the "gen" script to update the static/egl/*.java files
as part of doing an update. Altered the "git" lines to change
directories before invoking git -- necessary because we're now
split between frameworks/base and frameworks/native.
Bug 9204146
Change-Id: Ie60504b1932349e6f2c9d3868dee6a645ef2b36e
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
Initially populated with EGL_ANDROID_presentation_time (moved from the
EGL14 class) and the ES-relevant parts of EGL_KHR_create_context.
Bug: 8678160
Change-Id: Ifed2ee3da264ca701ae1f4b309a0758f7fcc3acc
We were recommending SystemClock#uptimeMillis() from Java code, but
millisecond resolution is a little coarse. We don't have an
appropriate call in SystemClock, so use System.nanoTime() instead.
Bug 8733179
Change-Id: Ifb85a03eabf7ff168966adcb5ed5914bbf3884b2
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
The getarray() function checks to see if there's enough room in
the buffer, but it's using a byte count for the available size
and a possibly non-byte count for the space required. Dividing
down by the unit size corrects the problem.
Bug 8713753
Change-Id: Id42c0df65c3233dcc5f76d05e229f7d40d4c1f99
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
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
Updating the generator to handle GLvoid*/java.nio.Buffer return values
probably wouldn't be too hard, but this is the only function that
needs it currently.
Bug: 8566953
Change-Id: I359a951136ab479ab576ce2e5a2881b937b7e8c9
Just a search-and-replace on the glGetActiveAttrib special-case, since
they have the same signature and parameter handling.
Bug: 8566953
Change-Id: I40834d6f32bf9ecb39718df29036aa2d1bbfa07a
Some of these are new ES3 functions, some are existing ES2 functions
that can now use the new pixel pack/unpack buffer bindings.
glDrawElementsInstanced needs a special case since the pointer/offset
arg isn't the last one like the generator assumes.
Bug: 8566953
Change-Id: I638a36b0a31aefcb5bfee6f4d049348223045103
Return values are declared with the C return type, but the JNI
function returns the JNI return type. In the case of GLsync/jlong as
in glFenceSync(), this causes a compile error. So the generator now
explicitly casts the return value to the JNI return type.
Bug: 8566953
Change-Id: I814befe2e4cce745434cbc4e1c8639fc3ce8aeae
This change adds ES3 functions to GLES30.spec, disabling any that
require non-trivial changes for the generator to handle.
Steps taken to add these:
- Copy ES3 function declarations from gl3.h
- Remove GL_APICALL, GL_APIENTRY, and semicolon from each declaration
- Add whitespace around parens and *s as required by the parser
- Comment out functions that the generator doesn't understand or that
it generates bad Java interfaces for (by inspection).
Bug: 8566953
Change-Id: Iaaef7d53e24f9a576759dbba72cd206bae1c1276
With the addition of float framebuffer support in ES3, some parameters
to ES2 functions are now GLfloat instead of GLclampf. Both are
typedefs for 'float', so this is a source and binary compatible change.
Bug: 8566953
Change-Id: I0b5acc78da7799a04053fdb568205f793792cad9
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