Commit Graph

337 Commits

Author SHA1 Message Date
Mathias Agopian
c3ce880972 fix [3258603] 'Quadrant' benchmark crashes inside eglQueryContext on GB/Crespo
eglQueryContext(..., EGL_CONFIG_ID, ...) is dereferencing an uninitialized pointer
due to a typo.

Change-Id: I100addf3150f19cb6dfbce9987fb5239dd240878
2010-12-08 15:34:02 -08:00
Mathias Agopian
644bb2a29e [3229973, 3247470, ...] set EGLNativeWindowSurface's format in EGL
(there are multiple bugs this should fix)

we now use the EGL_NATIVE_VISUAL_ID of a config to set
the ANativeWindow's format from eglCreateWindowSurface(),
this guarantees that the surface's format will match
whatever EGLConfig the user chose.

this should fix all current and future config/surface format
mismatch and allow users to easily select 32-bits surfaces.

Change-Id: I3835d0eb70c75eeecded3c3509a0a8207554c98b
2010-12-03 14:15:40 -08:00
Mathias Agopian
70745094cc Merge "DO NOT MERGE. workaround [3177481] eglGetProcAddress() returns the wrong pointer for some GL extensions" into gingerbread 2010-11-10 14:09:17 -08:00
Mathias Agopian
744026fed6 DO NOT MERGE. workaround [3177481] eglGetProcAddress() returns the wrong pointer for some GL extensions
We just make sure eglGetProcAddress() will return NULL for
 glEGLImageTargetTexture2DOES
 glEGLImageTargetRenderbufferStorageOES

which is better than returning the address of the wrong implementation.

the correct fix is more involved.

Change-Id: I585a1f40e564f862e5dd382224609ccd069cd3b5
2010-11-09 14:41:13 -08:00
David 'Digit' Turner
dfd0759ff6 Refresh EGL header to work with the NDK
This change allows to use this header with the NDK's standalone toolchain.
For the record, the NDK toolchain defines __ANDROID__ as a compiler built-in
macro, this is however not the case currently for the prebuilt binaries that
are being used by the full Android build system, which otherwise defines ANDROID.

This change allows the header to be used by all toolchains properly. Note however
that we should properly should change our toolchain and sources to provide and
rely on __ANDROID__ instead of ANDROID though.

Change-Id: Iaa1aa1146985b5f24dcf3a83d9ddb9b4b59dc328
2010-11-07 23:36:28 +01:00
Mathias Agopian
639716736f fix eglChooseConfig() for special attributes.
affects software renderer (emu) only.

per EGL spec:
  If EGL_MAX_PBUFFER_WIDTH, EGL_MAX_PBUFFER_HEIGHT,
  EGL_MAX_PBUFFER_PIXELS, or EGL_NATIVE_VISUAL_ID are speciļ¬ed
  in attrib list, then they are ignored

Change-Id: I3d5214ce896986da2f11d2eb1889afc41731eaa6
2010-10-25 15:51:24 -07:00
Mathias Agopian
6af358e0a7 fix [3119687] [Maps][4.6.0] Force close in street view
The EGLConfig attributes MUST be sorted, because they're used in a binary search.
A recent change introduced a bug where 2 of the configs had improperly
sorted attributes.

Change-Id: I1ac53e4463d62f27125ca9f82ed946e6c98ddba0
2010-10-21 15:58:25 -07:00
Mathias Agopian
a6da12c071 Merge "Add a test application to dump all the EGLConfig available" into gingerbread 2010-10-20 20:05:28 -07:00
Mathias Agopian
d8e5ceb963 software renderer: fix [3117351] GL driver doesn't set the EGL_NATIVE_VISUAL_ID
Change-Id: I371bc0abfee6065247bc6f04b0e0451645eb2dbf
2010-10-20 17:21:43 -07:00
Mathias Agopian
16a3e39cc0 Add a test application to dump all the EGLConfig available
Change-Id: Iddf27f2a9dd51733f6b90081a523ca37bfe310fa
2010-10-20 17:10:47 -07:00
Mathias Agopian
141550bc18 fix [2236865] STOPSHIP: bump soft gl and egl minor version number
Change-Id: Ibf46b18d7493348e189f2c93e969a6cac61f68b5
2010-10-19 14:47:08 -07:00
Mathias Agopian
6f0871222f better fix for [3028370] GL get error should return a valid error if no context is bound.
it turns out that we cannot return INVALID_OPERATION from glGetError() because the
GL spec says that it must be called in a loop until it returns GL_NO_ERROR.

now, we always return 0 from GL functions called from a thread with no
context bound. This means that glGetError() will return NO_ERROR in this case,
which is better than returning a random value (which could trap the app in a loop).

if this happens in the main thread of a process, we LOG an error message once.

Change-Id: Id59620e675a890286ef62a257c02b06e0fdcaf69
2010-09-23 16:44:48 -07:00
Mathias Agopian
05c53113e0 fix [3028370] GL get error should return a valid error if no context is bound.
glGetError() will now always return GL_INVALID_OPERATION if called from a thread
with no GL context bound.

Change-Id: I28ba458871db051bb4f5a26668a1fa123526869c
2010-09-23 13:19:02 -07:00
Mathias Agopian
02dafb5068 fix small bug in EGL error management
make sure to clear our EGL implementation's error when returning
an error from an underlying implementation

Change-Id: Ibce4726cef1f900e4c7f16002345d7a07f8cdf41
2010-09-21 15:43:59 -07:00
Brian Swetland
2b9e4f6a24 support loading EGL libraries from /vendor/lib/egl as well as /system/lib/egl
Change-Id: Idd9ca85ce3ba6c92234375071b53e5365e689062
2010-09-20 12:58:15 -07:00
Michael I. Gold
7f198b6bff surfaceflinger / GL extensions cleanup
Add correct enumerants for OES_EGL_image_external to glext.h.
SurfaceFlinger now checks for the correct extension name.

Change-Id: I2ba2728a01fa2260bd086d2df4316c68f694a9b1
2010-09-15 17:15:31 -07:00
Mathias Agopian
8296221138 option to enable multisampling
multisampling can be enabled by specifying the number of
samples desired on the command line.

Change-Id: I5f93c93ae7ada54bcd646c1065e07890d0cb9808
2010-09-09 11:53:17 -07:00
Mathias Agopian
e7bca18f79 Merge "Fix a few typos in EGL wrapper" into gingerbread 2010-09-09 11:20:02 -07:00
Mathias Agopian
77fbf8ddd9 Fix a few typos in EGL wrapper
Change-Id: I3b815ca6ec334ca12088f9721eece33df42b2e46
2010-09-09 11:12:54 -07:00
Mathias Agopian
879ba138fc add a fps counter to sanangeles demo
Change-Id: I9a9473ce213301cc7661fddfb1ef5a6ffcb346d4
2010-09-08 18:55:42 -07:00
Mathias Agopian
10cab190ba cleanup EGL a bit. remove unused extension.
Change-Id: Ia87120b076ab1bf7b28f06087878d8161fb46c88
2010-08-27 13:17:32 -07:00
Mathias Agopian
e3586182ec fix [2931718] glDrawArrays skips a triangle when more than 70 vertices are used.
a typo prevented the last 2 vertices of a batch to be copied to the front of
the next batch. Instead, the 2 very first vertices were used.

Change-Id: I3c344784dac1cef64df2fb6f6efb2f901cc788db
2010-08-18 20:07:25 -07:00
Mathias Agopian
031213e5b3 fix [2931161] crash in labyritnth when completing a level
Change-Id: I821d67effaf73d7008b2828d06f5489d1f976a1e
2010-08-18 16:07:34 -07:00
Mathias Agopian
4a88b52235 fix [2912927] Can't get NV_draw_path extension to work
there was a problem with eglGetProcAddress() which would only work with
GLES 1.x contexts.

Change-Id: I4747671cbf7ed469bb471a377f1d6f36550d24df
2010-08-13 14:17:58 -07:00
Mathias Agopian
7f781d1552 improve a bit the implementation of eglGetProcAddress
Change-Id: Ie07f33ae2162830df1e4f3d3b5e00fcfb8c350d6
2010-08-09 18:35:43 -07:00
Mathias Agopian
24035338ed fix [2421247] implement eglGetProcAddress(), needed in the ndk
Change-Id: I5027a27b43c0dd449a404024087853ca05bb8e4e
2010-08-02 18:23:36 -07:00
Mathias Agopian
bb0628d9de remove copybit hack from software opengl (libagl)
h/w acceleration is not supported through software gl + copybit anylonger,
instead, h/w opengl must be used. in the system compositor, a new h/w
composition api will be introduced to allow h/w accelerated composition with
overlays and/or 2D blocks.

Change-Id: I04949cb074ba8c4d637319ace23497c16a58d5bf
2010-07-29 23:28:03 -07:00
Mathias Agopian
cee79391c8 fix [2870926] Issue 9802: EGL wrapper has not been implemented correctly for eglQuerySurface().
rework how our EGL wrapper manages EGLConfig:

- we now store the EGLConfig with the EGLSurface and EGLContext
  so that we can have easy access to it from eglQueryContext
  and eglQuerySurface.

- EGLConfig now are an index into a sorted table of egl_config_t,
  we use a binary search to retrieve our EGLConfig (the index) from
  the implementation's EGLConfig.

- egl_config_t keeps track of the implementation's index,
  EGLConfig and CONFIG_ID as well as our CONFIG_ID.

In many ways, this implementation is simpler and more robust, as it doesn't
assume anything about the number of implementations nor what EGLConfig is
made of (the previous code assumed EGLConfig didn't usem more than 24-bits).

Change-Id: Id5abe923aacb6e1fd2b63bd8c15d7b04ae824922
2010-07-26 21:14:59 -07:00
Mathias Agopian
bf83375c73 Merge "Fix a bug that prevented the creation of EGL shared contexts." into gingerbread 2010-07-02 12:32:33 -07:00
Jamie Gennis
4c39f8f9e2 Fix a bug that prevented the creation of EGL shared contexts.
Change-Id: I6b0ec5ef86abdd4e9083067ba297107cfb094df3
2010-07-02 12:05:07 -07:00
Dianne Hackborn
4b5e91e482 Introduce official public NativeWindow type.
Not yet hooked up to anything in the NDK, but requires renaming
the existing android_native_window_t type everywhere.

Change-Id: Iffee6ea39c93b8b34e20fb69e4d2c7c837e5ea2e
2010-06-30 15:32:04 -07:00
Jack Palevich
b3ffef9dfe Add OpenGL ES 2.0 VBO versions glDrawElements and glVertexAttribPointer.
Change-Id: Id0069535e97fe96eef74e4d0c1d19b010061fe3b
2010-06-22 20:08:40 +08:00
Mathias Agopian
0a91775c4d Added support for the GL_TEXTURE_EXTERNAL target
This will allow us to support YUV surfaces.

Change-Id: I2d4da75f1006a5285bdc552695d4caeecccf2183
2010-06-15 17:31:17 -07:00
Mathias Agopian
e81a3cb2bd update EGL headers to the latest
note that this doesn't update the EGL stubs.

Change-Id: I00274431a490249d93eb6b5ba13f274b7f2682ae
2010-06-09 18:56:05 -07:00
Mathias Agopian
11cca925b2 update GL ES stub libraries with the new GL ES headers
Change-Id: I83be94049ddfe3fd7f5bee71a21172ade1498dd5
2010-06-09 18:20:21 -07:00
Mathias Agopian
05bb9c973b fix OpenGL ES extension headers from khronos
the official headers have a couple typos, which
this CL fixes.

Change-Id: I0359531a05a4a62ddbdce70c5841ec1c355feb3b
2010-06-09 18:19:11 -07:00
Mathias Agopian
8f62c3031e update the OpenGL ES headers to the latest
Change-Id: Iceef1e95504897a5e3759b0401cf7031c9e74547
2010-06-09 18:08:15 -07:00
Mathias Agopian
04aed2149d fix a crasher in our EGL wrapper when attrib_list is NULL in eglChooseConfig
the EGL specification states that this should be treated as though it was
an empty list terminated with EGL_NONE.

Change-Id: I294104370a86b5e5c34c7bcf15c5459eab464631
2010-05-17 14:45:43 -07:00
The Android Open Source Project
e4582835f0 am fb234bbe: merge from open-source master
Merge commit 'fb234bbe5e7cbae42b4fc8f4ab353ba561599db2' into kraken

* commit 'fb234bbe5e7cbae42b4fc8f4ab353ba561599db2':
  Notify user regarding invalid number during MO call.
  Build software AGL library with correct get_tls() macro for ARMv7 based platforms
  Fix glReadPixels() to verify that both x and y are non-negative.
2010-05-12 12:13:18 -07:00
The Android Open Source Project
c77a20a9d6 merge from open-source master
Change-Id: I022d0781a232396e2b8a67a420ecf50e64b87d8c
2010-05-12 11:58:14 -07:00
Mathias Agopian
b0eed511a2 Merge "Build software AGL library with correct get_tls() macro for ARMv7 based platforms" 2010-05-10 20:28:02 -07:00
Mathias Agopian
32a220aa6e Merge "Fix glReadPixels() to verify that both x and y are non-negative." 2010-05-10 20:26:24 -07:00
Mathias Agopian
bf41b11ef8 small cleanup. gEGLImpl should have been static
also added a ctor to initialized it in case we use it ont he stack
one day.

Change-Id: I2736b9bce3d8ba3b74fd029de4c18cca2cdbbf60
2010-04-09 14:26:07 -07:00
The Android Open Source Project
45ef27a260 merge from open-source master
Change-Id: I627b3a7080e413f756d1751cdae88ec6642b02c4
2010-03-31 14:01:45 -07:00
Mathias Agopian
8fb47ec10e Fix Android's glEGLImageTargetRenderbufferOES() wrapper
glEGLImageTargetRenderbufferOES() pass the wrapped EGLImage
to the implementation, rather than the unwrapped one.

Change-Id: I149f9ed73e6ab9089110600e1db4311ba7a8c83a
2010-03-29 15:12:19 -07:00
Jack Palevich
4b1409812a Add a test of EGL pausing and resuming. 2010-03-29 12:16:55 -07:00
Mathias Agopian
988fce5ee5 fix [2236865] STOPSHIP: bump soft gl and egl minor version number
this is to allow developpers to deal with potiential differences
between the softgl versions.

Change-Id: I7ec2451d6af1be29818d66215b22977405d403e8
2010-03-25 20:21:12 -07:00
Jae-Hyung Ahn
7efc2fc955 gl_code : add end of line.
Signed-off-by: Jae-Hyung Ahn <jerry.ahn@windriver.com>
2010-03-24 10:15:41 -07:00
Jack Palevich
81cd084485 Implement eglInitialize / eglTerminate reference counting
Previously we imlpemented the standard semantics for
eglInitialize / eglTerminate, which are that
eglInitialize may be called any number of times,
but the first call to eglTerminate will terminate
the display.

Now we follow reference-countins semantics, which
means that eglTerminate will only terminate the
display when the reference count returns to zero.

This change allows EGL to be used by multiple
independently written modules in the same process.

(Otherwise there is no way for the independent
modules to coordinate their use of the display.)
2010-03-15 21:21:51 -07:00
Jack Palevich
7c5fe4c4f6 Fix glCopyTexSubImage2D inverted texture bug.
This bug only affects the software OpenGL ES
driver.
2010-03-12 17:32:26 -08:00