summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up use of HAVE_ANDROID_OSKenny Root2011-02-161-1/+1
| | | | | | | | HAVE_ANDROID_OS was defined as "1" for targets, but never defined as "0" for non-targets. Changing them to #ifdef should be safe and matches all the other uses of HAVE_ANDROID_OS throughout the system. Change-Id: I82257325a8ae5e4e4371ddfc4dbf51cea8ea0abb
* Clear all EGL errors when entering EGL funcs.Jamie Gennis2011-01-311-4/+3
| | | | | | | | | This changes the clearError function in the EGL wrapper layer to simply call eglGetError(). That should clear any pending errors from all the underlying EGL implementations, which is needed to correctly report the error for the most recently called EGL function. Change-Id: Iad19c69f0c5305e873f3c2f96d353280d31f7b61
* egl: clear error on function entryMichael I. Gold2011-01-251-1/+92
| | | | | | | | Clear the current thread error state on entry to API functions as mandated by the EGL 1.4 specification, section 3.1. glGetError returns additional information about the "most recent EGL function". Change-Id: Ic24c64b39294ffc1a4e43fa72663e076b9d7decf
* egl: fix GetProcAddress for EGLimage extensionsMichael I. Gold2011-01-161-0/+33
| | | | | | | | Return wrappers from GetProcAddress for glEGLImageTargetTexture2DOES and glEGLImageTargetRenderbufferStorageOES which unwrap the EGLimage handle before calling through to the implementation. Change-Id: I2f5b180ab3ccdb28a4f510a2bd8c2eee941a84df
* egl: expose EGLimage extensionsMichael I. Gold2011-01-161-0/+2
| | | | | | | | Add EGL_KHR_gl_texture_cubemap_image and EGL_KHR_gl_renderbuffer_image to the static EGL extension string since these require no new APIs beyond what is already required. Change-Id: I2d1fde86b19bb9eee46b3b977f51784a17cfcc3c
* egl: fixes for object refcountsMichael I. Gold2010-12-231-20/+31
| | | | | | | | eglMakeCurrent() would only deref the previous surfaces if the old and new contexts were the same. eglTerminate() should not touch TLS. eglReleaseThread() needs to unbind the current context. Change-Id: I213b8be77b1a23b5a8a6afaac60643662c8aa010
* am 054ae782: am e1752f41: Merge "fix [3258603] \'Quadrant\' benchmark ↵Mathias Agopian2010-12-081-2/+2
|\ | | | | | | | | | | | | crashes inside eglQueryContext on GB/Crespo" into gingerbread * commit '054ae78245fe9b4c14bbc372ae77cd0a977ded73': fix [3258603] 'Quadrant' benchmark crashes inside eglQueryContext on GB/Crespo
| * fix [3258603] 'Quadrant' benchmark crashes inside eglQueryContext on GB/CrespoMathias Agopian2010-12-081-2/+2
| | | | | | | | | | | | | | eglQueryContext(..., EGL_CONFIG_ID, ...) is dereferencing an uninitialized pointer due to a typo. Change-Id: I100addf3150f19cb6dfbce9987fb5239dd240878
* | am 0484a673: am daef0a04: Merge "[3229973, 3247470, ...] set ↵Mathias Agopian2010-12-061-8/+25
|\ \ | |/ | | | | | | | | | | EGLNativeWindowSurface\'s format in EGL" into gingerbread * commit '0484a673c5839d2be9e615e52c6a45febdf1127b': [3229973, 3247470, ...] set EGLNativeWindowSurface's format in EGL
| * [3229973, 3247470, ...] set EGLNativeWindowSurface's format in EGLMathias Agopian2010-12-031-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
| * DO NOT MERGE. workaround [3177481] eglGetProcAddress() returns the wrong ↵Mathias Agopian2010-11-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Trace glUniformXXv and glUniformMatrixXfv calls.Jack Palevich2010-10-271-30/+138
| | | | | | | | Change-Id: I653021d2174fa1a7343d10b0fd2c29b3e5147be6
* | OpenGL tracing.Jack Palevich2010-10-262-6/+320
| | | | | | | | | | | | | | | | Enable with: adb shell setprop debug.egl.trace 1 Change-Id: Icfbc795f5260141510975228e72234e9aab56a85
* | am 4eb1ad5e: am 524a6d8e: Merge "better fix for [3028370] GL get error ↵Mathias Agopian2010-09-231-9/+2
|\ \ | |/ | | | | | | | | | | | | | | should return a valid error if no context is bound." into gingerbread Merge commit '4eb1ad5e98c7b36f7ac4ec8c3270f9763afd107e' * commit '4eb1ad5e98c7b36f7ac4ec8c3270f9763afd107e': better fix for [3028370] GL get error should return a valid error if no context is bound.
| * better fix for [3028370] GL get error should return a valid error if no ↵Mathias Agopian2010-09-231-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am 9c4d7d67: am 5c6c5c7a: fix [3028370] GL get error should return a valid ↵Mathias Agopian2010-09-231-0/+9
|\ \ | |/ | | | | | | | | | | | | | | error if no context is bound. Merge commit '9c4d7d677097981a349c718902e29050dad3d59f' * commit '9c4d7d677097981a349c718902e29050dad3d59f': fix [3028370] GL get error should return a valid error if no context is bound.
| * fix [3028370] GL get error should return a valid error if no context is bound.Mathias Agopian2010-09-231-0/+9
| | | | | | | | | | | | | | glGetError() will now always return GL_INVALID_OPERATION if called from a thread with no GL context bound. Change-Id: I28ba458871db051bb4f5a26668a1fa123526869c
* | am d01ce192: am 9d5fac51: Merge "fix small bug in EGL error management" into ↵Mathias Agopian2010-09-221-2/+4
|\ \ | |/ | | | | | | | | | | | | | | gingerbread Merge commit 'd01ce1924a51539c4d47ef1f55913bdf1a018124' * commit 'd01ce1924a51539c4d47ef1f55913bdf1a018124': fix small bug in EGL error management
| * fix small bug in EGL error managementMathias Agopian2010-09-211-2/+4
| | | | | | | | | | | | | | make sure to clear our EGL implementation's error when returning an error from an underlying implementation Change-Id: Ibce4726cef1f900e4c7f16002345d7a07f8cdf41
* | Merge "fix typo EGL_NO_IMAGE_KHR -> EGL_NO_SYNC_KHR"Mathias Agopian2010-09-221-4/+4
|\ \
| * | fix typo EGL_NO_IMAGE_KHR -> EGL_NO_SYNC_KHRMathias Agopian2010-09-211-4/+4
| | | | | | | | | | | | Change-Id: I38c87803e32030918f2deb06381eabce0faa870c
* | | am 5c746522: am 181e5ea8: Merge "support loading EGL libraries from ↵Brian Swetland2010-09-202-14/+16
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | /vendor/lib/egl as well as /system/lib/egl" into gingerbread Merge commit '5c7465220d52c64c87fe4566fe109c649ec5c4f7' * commit '5c7465220d52c64c87fe4566fe109c649ec5c4f7': support loading EGL libraries from /vendor/lib/egl as well as /system/lib/egl
| * support loading EGL libraries from /vendor/lib/egl as well as /system/lib/eglBrian Swetland2010-09-202-14/+16
| | | | | | | | Change-Id: Idd9ca85ce3ba6c92234375071b53e5365e689062
* | Add support for KHR_fence_syncMathias Agopian2010-09-102-0/+132
| | | | | | | | Change-Id: Ie2771b5869c9c8dcf5ecf9318e2ee6d4d1cd5cc9
* | am a9ff29b5: am 6808e6a8: Merge "Fix a few typos in EGL wrapper" into ↵Mathias Agopian2010-09-091-2/+2
|\ \ | |/ | | | | | | | | | | | | | | gingerbread Merge commit 'a9ff29b59cf33e552285a0bff3caf7a44f93f1c0' * commit 'a9ff29b59cf33e552285a0bff3caf7a44f93f1c0': Fix a few typos in EGL wrapper
| * Fix a few typos in EGL wrapperMathias Agopian2010-09-091-2/+2
| | | | | | | | Change-Id: I3b815ca6ec334ca12088f9721eece33df42b2e46
| * cleanup EGL a bit. remove unused extension.Mathias Agopian2010-08-271-19/+0
| | | | | | | | Change-Id: Ia87120b076ab1bf7b28f06087878d8161fb46c88
* | Add KHR_gl_texture_2D_image extension string.Mathias Agopian2010-08-271-0/+1
| |
* | cleanup EGL a bit. remove unused extension.Mathias Agopian2010-08-271-19/+0
|/ | | | Change-Id: I7758bc7d6dc2e70fc3590fe939ebf71fbcde7059
* fix [2912927] Can't get NV_draw_path extension to workMathias Agopian2010-08-131-2/+3
| | | | | | | there was a problem with eglGetProcAddress() which would only work with GLES 1.x contexts. Change-Id: I4747671cbf7ed469bb471a377f1d6f36550d24df
* improve a bit the implementation of eglGetProcAddressMathias Agopian2010-08-091-86/+32
| | | | Change-Id: Ie07f33ae2162830df1e4f3d3b5e00fcfb8c350d6
* fix [2421247] implement eglGetProcAddress(), needed in the ndkMathias Agopian2010-08-022-45/+226
| | | | Change-Id: I5027a27b43c0dd449a404024087853ca05bb8e4e
* fix [2870926] Issue 9802: EGL wrapper has not been implemented correctly for ↵Mathias Agopian2010-07-261-98/+138
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix a bug that prevented the creation of EGL shared contexts.Jamie Gennis2010-07-021-0/+4
| | | | Change-Id: I6b0ec5ef86abdd4e9083067ba297107cfb094df3
* fix a crasher in our EGL wrapper when attrib_list is NULL in eglChooseConfigMathias Agopian2010-05-171-4/+6
| | | | | | | the EGL specification states that this should be treated as though it was an empty list terminated with EGL_NONE. Change-Id: I294104370a86b5e5c34c7bcf15c5459eab464631
* small cleanup. gEGLImpl should have been staticMathias Agopian2010-04-091-1/+1
| | | | | | | also added a ctor to initialized it in case we use it ont he stack one day. Change-Id: I2736b9bce3d8ba3b74fd029de4c18cca2cdbbf60
* Implement eglInitialize / eglTerminate reference countingJack Palevich2010-03-151-1/+4
| | | | | | | | | | | | | | | | | 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.)
* fix [2189862] Race condition in eglIntialize and eglDestroyMathias Agopian2010-02-051-3/+16
| | | | | there is now a lock protext a perticular display. it's held during initialization and destruction.
* fix [2303866] eglMakeCurrent doesn't return all error messages described in ↵Mathias Agopian2010-01-251-3/+3
| | | | the spec
* fix[2222341] Soft reset while going back from camcorder settingsMathias Agopian2009-10-301-1/+1
| | | | | | add a way to convert a mapped "pushbuffer" buffer to a gralloc handle which then can be safely used by surfaceflinger, without including gralloc_priv.h
* return proper error code from eglCreateImageKHRMathias Agopian2009-10-291-4/+24
|
* fix [2187212] add support for GLESv2 dispatch based on TLSMathias Agopian2009-10-144-123/+138
| | | | | | | | | | | | | Instead of using a different function pointer table for ES 1.x and ES 2.x, we use a single one that is the union (sort|uniq) of both tables. Two instances of this table are initialized with pointers to GL ES 1.x and GL ES 2.x entry-points. When a context is created, we store its version number and when it is bound to a thread we set the approruiate table based on the stored version. This introduce no penalty while dispatching gl calls to the right API version. [Pending Dr No approval for MR1]
* log an error when loading an existing GL driver failsMathias Agopian2009-09-201-5/+14
|
* fix a bug recently introduced where EGL couldn't be initialized again after ↵Mathias Agopian2009-08-241-76/+116
| | | | it had been terminated once
* first step for fixing [2066786] EGL object lifetime management doesn't ↵Mathias Agopian2009-08-211-71/+243
| | | | | | | | | | | | | | | | respect the EGL spec this change fixes the lifetime mgt of EGLSurface, EGLContext and EGLImageKHR in the EGL wrapper. EGLDisplay is still somewhat bogus and libagl's EGL is still incorrect. The idea of the change is that EGL objects are put in a list when created and removed when destroyed. Before each use, we first verify if the object is in the list and if so a reference is taken and kept for the scope of the whole EGL API being called, if not, an error is returned. Upon object destruction, the object is simply marked as "terminated" (this is not protected by a lock because it doesn't really matter). This flag is only used to deny access to the object by other APIs while it's still valid (for instance current or being used by another function in another thread). A reference is also removed and the object can then actually be destroyed when going out of scope.
* fix a bug in ComponentSizeChooser where it could pick a software EGLConfig ↵Mathias Agopian2009-08-201-2/+2
| | | | | | instead of a better h/w one. We now just try to honor the stencil / depth buffer "at least", while doing a "shortest distance" on the colors.
* fix bug [2021677] egl driver unloaded after eglTerminate() is calledMathias Agopian2009-08-171-99/+99
| | | | | | | | | | refactored the code so that: - EGL APIs that can be called before or after eglInitialize() will work by loading the drivers first - make eglGetDisplay() a lot more efficient - make sure that EGL drivers are loaded in a thread-safe way - don't unload the drivers upon calling eglTerminate(), they're now never unloaded, since there is no safe way to do it (some thread could be running) - updated our EGL version to 1.4 - return better error codes if errors happen during initialization
* Better error handling in EGL extensionsMathias Agopian2009-08-121-11/+9
|
* log opengl-call-with-no-context only once per thread, instead of for each ↵Mathias Agopian2009-07-311-2/+9
| | | | function call
* GLESv2 couldn't be loaded due to wrong path specificationMathias Agopian2009-07-291-1/+1
|