History log of /external/mesa3d/src/egl/main/eglapi.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fbb4af96c6b6be08ed93e8d5a704b9f7002642f8 16-Dec-2016 Chad Versace <chadversary@chromium.org> egl: Check config's surface types in eglCreate*Surface()

If the provided EGLConfig does not support the requested surface type,
then emit EGL_BAD_MATCH.

Fixes dEQP-EGL.functional.negative_api.create_pbuffer_surface
on GBM.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
5e97b8f5ce975dfb66cc46e6b4cc1e89eb8c1dc0 13-Dec-2016 Chad Versace <chadversary@chromium.org> egl: Fix crashes in eglCreate*Surface()

Don't dereference a null EGLDisplay.

Fixes tests
dEQP-EGL.functional.negative_api.create_pbuffer_surface
dEQP-EGL.functional.negative_api.create_pixmap_surface

Reviewed-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99038
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/egl/main/eglapi.c
26541a1fcc1fbb1e4aa25e79225bbe43d50d600d 05-Dec-2016 Emil Velikov <emil.velikov@collabora.com> egl: add and enable EGL_KHR_config_attribs

Extension is already implemented in the main code.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
/external/mesa3d/src/egl/main/eglapi.c
9e1d35ca75852d5b6ad24a7df278b2c3efc31a46 08-Dec-2016 Eric Engestrom <eric@engestrom.ch> egl: unexport _eglConvertIntsToAttribs

Nobody else makes use of this function.
We can always re-export it if someone ever needs it.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
4729e1b511cf9411d4e2dfb6fba488f874d57acd 08-Dec-2016 Eric Engestrom <eric@engestrom.ch> egl: rename static functions to match convention

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
0201f01dc4e903d9b60cbbf87fde3ffa7c76f248 18-Nov-2016 Rob Clark <robclark@freedesktop.org> egl: add EGL_ANDROID_native_fence_sync

With fixes from Chad squashed in, plus fixes for issues that Rafael
found while writing piglit tests.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Tested-by: Chad Versace <chadversary@chromium.org>
/external/mesa3d/src/egl/main/eglapi.c
9702f9136646acc6981880faa3962a11aab1a603 16-Nov-2016 Eric Engestrom <eric@engestrom.ch> egl: fix helper function name

I introduced this code last month, but didn't follow the naming
convention. Fix this.

Fixes: 0a606a400fe382a9bc72 ("egl: add eglSwapBuffersWithDamageKHR")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
/external/mesa3d/src/egl/main/eglapi.c
ee39d4456e7551b257343551d59e7c6a3388fdc0 02-Nov-2016 Marek Olšák <marek.olsak@amd.com> egl: make interop ABI visible again

This was broken when the GLAPI use was removed from mesa_glinterop.h.

Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
6bf6fcfcd9a916530bfbd47351bd1f0df47c4a3d 25-Oct-2016 Tapani Pälli <tapani.palli@intel.com> egl: fix error handling in _eglCreateSync

EGL specification requires context to be current only when sync
type matches EGL_SYNC_FENCE_KHR.

Fixes 25 failing dEQP tests:
dEQP-EGL.functional.reusable_sync.*

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98339
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
/external/mesa3d/src/egl/main/eglapi.c
5876f3c85a61d73bb4863331bd641152a40a7b0c 20-Oct-2016 Tapani Pälli <tapani.palli@intel.com> egl: add check that eglCreateContext gets a valid config

Fixes following dEQP test:

dEQP-EGL.functional.negative_api.create_context

v2: don't break EGL_KHR_no_config_context (Eric Engestrom)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/egl/main/eglapi.c
a597c8ad5b75f37336257e3f4462caebacb621ef 13-Oct-2016 Chad Versace <chadversary@chromium.org> egl: Implement EGL_MESA_platform_surfaceless

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
0a606a400fe382a9bc726beef269b47f4485d85f 10-Oct-2016 Eric Engestrom <eric.engestrom@imgtec.com> egl: add eglSwapBuffersWithDamageKHR

EGL_KHR_swap_buffers_with_damage is actually already supported, as it is
technically nothing but a rename of EGL_EXT_swap_buffers_with_damage.

To that effect, both extension are advertised depending on the same
condition, and the new entrypoint simply redirects to the previous one.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
804488518296fbf20b06244bc0aa2e2793c61998 27-Sep-2016 Chad Versace <chadversary@chromium.org> egl: Unify the EGLint/EGLAttrib paths in eglCreateSync* (v3)

Pre-patch, there were two code paths for parsing EGLSync attribute
lists: one path for old-style EGLint lists, used by eglCreateSyncKHR,
and another for new-style EGLAttrib lists, used by eglCreateSync (1.5)
and eglCreateSync64 (EGL_KHR_cl_event2).

There were two attrib_list parsing functions,
_eglParseSyncAttribList(_EGLSync *sync, const EGLint *attrib_list)
_eglParseSyncAttribList64(_EGLSync *sync, const EGLattrib *attrib_list)
This patch unifies the two attrib_list parsing functions into one,
_eglParseSyncAttribList(_EGLSync *sync, const EGLattrib *attrib_list)

Many internal EGLSync function signatures had *two* attrib_list
parameters to accomodate both code paths: one parameter was an EGLint
list and other an EGLAttrib list. At most one of the parameters was
allowed to be non-null. This patch removes the `EGLint *attrib_list`
parameter, leaving only the `EGLAttrib *attrib_list` parameter, for all
internal EGLSync functions.

v2:
- Consistently use condition (sizeof(int_list[0]) ==
sizeof(attrib_list[0])). [for emil]
v3:
- Don't double-unlock the display in eglCreateSyncKHR.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (v2)
/external/mesa3d/src/egl/main/eglapi.c
ca9f26ac6fcb0afb68101fb3f74fcb3100507c0c 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Implement EGL_KHR_debug (v2)

Wire up the debug entrypoints to EGL dispatch, and add the extension
string to the client extension list.

v2:
- Lots of style fixes
- Fix missing EGLAPIENTRYs
- Factor out valid attribute check
- Lock display in eglLabelObjectKHR as needed, and use RETURN_EGL_*
- Move "EGL_KHR_debug" into asciibetical order in client extension
string

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.veliko@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
6a5545d3ba60a19a3bce8f62141e0991a595eeaf 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Track EGL_KHR_debug state when going through EGL API calls (v3)

This decorates every EGL entrypoint with _EGL_FUNC_START, which records
the function name and primary dispatch object label in the current
thread state. It also adds debug report functions and calls them when
appropriate.

This would be useful enough for debugging on its own, if the user set a
breakpoint when the report function was called. We will also need this
state tracked in order to expose EGL_KHR_debug.

v2:
- Clear the object label in more cases in _eglSetFuncName
- Pass draw surface (if any) to _EGL_FUNC_START in eglSwapInterval

v3:
- Set dummy thread's CurrentAPI to EGL_OPENGL_ES_API not zero
- Less ?: in _eglSetFuncName

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.veliko@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
3e0d575a6d727c4334b783c443a5e1980dca43b4 27-Sep-2016 Chad Versace <chadversary@chromium.org> egl: Add _eglConvertIntsToAttribs()

This function converts an attribute list from EGLint[] to EGLAttrib[].
Will be used in following patches to cleanup EGLSync attribute parsing.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
f2c2f43d4ea2948e8fd9be1ab192664df262c0f4 27-Sep-2016 Chad Versace <chadversary@chromium.org> egl: Fix an error path in eglCreateSync*

When the user called eglCreateSync64KHR on a display without
EGL_KHR_cl_event2 (the only extension that exposes it), we returned
EGL_NO_SYNC but did not update the error code.

We also did the same for eglCreateSync on a display without EGL 1.5.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
17084b6f9340f798111e53e08f5d35c7630cee48 28-Sep-2016 Chad Versace <chadversary@chromium.org> egl: Fix missing unlock in eglGetSyncAttribKHR

On the error path, eglGetSyncAttribKHR neglected to unlock the
EGLDisplay before returning.

Fixes deadlock in dEQP-EGL.functional.fence_sync.invalid.get_invalid_value.

Cc: mesa-stable@lists.freedesktop.org
Cc: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
1d535c1e83ae45b67a141420298c5d08082e0ed8 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Factor out _eglGetSyncAttribCommon

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
5b0b844ac9818672bc3ddcdbbb74cb892b3485f4 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Factor out _eglWaitSyncCommon

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
9a992038e722b6ea8362db1dfcf2dd5a78888391 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Lock the display in _eglCreateSync's callers

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
58338c6b650d85a2484f50c0941cb3e2947fab8e 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Factor out _eglCreateImageCommon (v2)

v2:
- Pass disp to RETURN_EGL_ERROR so we unlock the display

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
82a2e2cb5024c37a1779594320f23f225a83c79d 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Factor out _eglWaitClientCommon

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
8cc3d9855f94cd0f2274a1831bc6fa8912ddea9c 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Use _eglCreatePixmapSurfaceCommon consistently

This moves the native pixmap fixup to a helper function so we don't
repeat ourselves.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
7d7ae5e1c3451174a3c8dec2d50763a40069fe5b 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Use _eglCreateWindowSurfaceCommon consistently

This moves the native window fixup to a helper function so we don't
repeat ourselves.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
017946b7247ea7c36219b44dfc118ccad4da7d1d 12-Sep-2016 Kyle Brenneman <kbrenneman@nvidia.com> egl: Factor out _eglGetPlatformDisplayCommon

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
d9f5b1915b397d4baaf4c9c23a93fda49f3db4ca 09-Sep-2016 Adam Jackson <ajax@redhat.com> egl: Rename MESA_configless_context bit to KHR_no_config_context

Keep the old name in the extension string, but refer to the KHR
extension internally.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
/external/mesa3d/src/egl/main/eglapi.c
6e066f76ee22909b0653ff8b89429de819e60f14 08-Jul-2016 Kyle Brenneman <kbrenneman@nvidia.com> EGL: Combine the GL and GLES current contexts (v2)

Only keep track of a single current context, instead of separate
contexts for GL and GLES.

In EGL 1.4 (and 1.5), EGL_OPENGL_API and EGL_OPENGL_ES_API are supposed
to be interchangeable for all purposes except for eglCreateContext.

The _EGLThreadInfo::CurrentContexts array is now a single pointer to the
current context, which may be a GL or GLES context. In addition, it now
keeps track of the current API as an enum instead of an index.

eglMakeCurrent will now replace the current context, regardless of which
client API is used for for the current and new contexts. It no longer
checks for a conflicting context. In addition, calling eglMakeCurrent
with EGL_NO_CONTEXT will now release the current context regardless of
the current API.

v2: Rebased against master (Adam Jackson)

Reviewed-by: Adam Jackson <ajax@redhat.com>
/external/mesa3d/src/egl/main/eglapi.c
8c361e84ad010552a42593fad4130befc58e9a6a 03-Jun-2016 Marek Olšák <marek.olsak@amd.com> Revert "egl: Check if API is supported when using eglBindAPI."

This reverts commit e8b38ca202fbe8c281aeb81a4b64256983f185e0.

It broke Glamor for Gallium at least.
/external/mesa3d/src/egl/main/eglapi.c
e8b38ca202fbe8c281aeb81a4b64256983f185e0 31-May-2016 Plamena Manolova <plamena.manolova@intel.com> egl: Check if API is supported when using eglBindAPI.

According to the EGL specifications before binding an API
we must check whether it's supported first. If not eglBindAPI
should return EGL_FALSE and generate a EGL_BAD_PARAMETER error.

Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/egl/main/eglapi.c
13faddb6b8e30ff0e81e62fb863304a57c712aae 30-May-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: remove mesa_glinterop typedefs

As is there are two places that do the typedefs - dri_interface.h and
this header. As we cannot include the former in here, just drop the
typedefs and use the struct directly (as needed).

This is required because typedef redefinition is C11 feature which is
not supported on all the versions of GCC used to build mesa.

v2: Kill the typedef alltogether, as per Marek.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96236
Cc: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/egl/main/eglapi.c
e384d75b120ce60954c545e8c6edbe98fd01bea7 21-Apr-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: make GL interop version field bidirectional

This allows clear and easy communication between the two.

Caller: Requesting information (struct vN)
Callee: I know how to deal with older version (vN-1) only. Here is your
data and the version I support.
Caller: Older version ? Sure I'll cap all access to the fields provided
by the older version (vN-1)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/egl/main/eglapi.c
b5f9820d905a275bc01bbffa9b4927ec11286f8d 03-May-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: remove unneeded GLAPI/GLAPIENTRY/APIENTRYP symbols

These come from windows.h, gl.h, glcorearb.h and/or glext.h.

The interop interface is aimed at non-Windows platforms while the macros
are used/derived due to Windows specifics. Thus we can safely remove
them.

Strictly speaking there should be GLXAPIENTRY/EGLAPIENTRY and alike
macros, although a) there is no GLX ones and b) this brings us even
further from decoupling the file from the GLX/EGL header dependency.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/egl/main/eglapi.c
21edd24c0de903a12a92e969b78d3a928b9ed50c 12-May-2016 Plamena Manolova <plamena.manolova@intel.com> egl: Add OpenGL_ES to API string regardless of GLES version

According to the EGL specifications eglQueryString(EGL_CLIENT_APIS)
should return a string containing a combination of "OpenGL", "OpenGL_ES"
and "OpenVG", any other values would be considered invalid. Due to this
when the API string is constructed, the version of GLES should be
disregarded and "OpenGL_ES" should be attached once instead of
"OpenGL_ES2" and "OpenGL_ES3".

Fixes:
dEQP-EGL.functional.negative_api* and
dEQP-EGL.functional.query_context.simple.query_api

Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
/external/mesa3d/src/egl/main/eglapi.c
b6eda708431b91a3b568da0efac845c08cb36796 03-Mar-2016 Marek Olšák <marek.olsak@amd.com> egl: implement EGL part of interop interface (v2)

v2: - use const
/external/mesa3d/src/egl/main/eglapi.c
70299474f58ad7c0299ea5f997019880d1c4deef 05-Apr-2016 Dongwon Kim <dongwon.kim@intel.com> egl: add EGL_KHR_reusable_sync to egl_dri

This patch enables an EGL extension, EGL_KHR_reusable_sync.
This new extension basically provides a way for multiple APIs or
threads to be excuted synchronously via a "reusable sync"
primitive shared by those threads/API calls.

This was implemented based on the specification at

https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_reusable_sync.txt

v2
- use thread functions defined in C11/threads.h instead of
using direct pthread calls
- make the timeout set with reference to CLOCK_MONOTONIC
- cleaned up the way expiration time is calculated
- (bug fix) in dri2_client_wait_sync, case EGL_SYNC_CL_EVENT_KHR
has been added.
- (bug fix) in dri2_destroy_sync, return from cond_broadcast
call is now stored in 'err' intead of 'ret' to prevent 'ret'
from being reset to 'EGL_FALSE' even in successful case
- corrected minor syntax problems

v3
- dri2_egl_unref_sync now became 'void' type. No more error check
is needed for this function call as a result.
- (bug fix) resolved issue with duplicated unlocking of display in
eglClientWaitSync when type of sync is "EGL_KHR_REUSABLE_SYNC"

Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/egl/main/eglapi.c
e21e81aa1885287e438970429d44abb8b3dabb96 02-Feb-2016 Rob Herring <robh@kernel.org> egl: Add EGL_RECORDABLE_ANDROID attribute

This is used by Android to select an eglconfig compatible with screen
recording.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rob Herring <robh@kernel.org>
[Emil Velikov: add the _eglIsConfigAttribValid check]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
8975527f58afd4af77966c6e46b485fc04008779 02-Feb-2016 Rob Herring <robh@kernel.org> egl: Add EGL_FRAMEBUFFER_TARGET_ANDROID attribute

This is used by Android to select an eglconfig compatible with HWComposer.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rob Herring <robh@kernel.org>
[Emil Velikov: add the _eglIsConfigAttribValid check]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
f3e23ead536e66940053265216b3886fef69d891 10-Feb-2016 Emil Velikov <emil.l.velikov@gmail.com> egl: remove remnants of MESA_drm_display

Last set in st/egl, unused in mesa-demos and superseded by
EGL_KHR_platform_gbm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
2295a4b1e124be0906907cf535efa022af5b8033 10-Feb-2016 Emil Velikov <emil.l.velikov@gmail.com> egl: remove final pieces of KHR_vg_parent_image

Similar to previous commit - unused/unset for a long time.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
d1e1563bb63f08cdfec1b40b105bec7f343bc0b8 03-Feb-2016 Dongwon Kim <dongwon.kim@intel.com> egl: move Null check to eglGetSyncAttribKHR to prevent Segfault

Null-check on "*value" is currently done in _eglGetSyncAttrib, which is
after eglGetSyncAttribKHR dereferences it.

Move the check a layer up (in the beginning of eglGetSyncAttribKHR) to
avoid segfaults.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
[Emil Velikov: tweak commit message, add stable tag]
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/main/eglapi.c
720125ff99a8563d1f5991bd7428b8d884f1f618 10-Jul-2015 Emil Velikov <emil.l.velikov@gmail.com> egl: remove ifdef $(egl_extension) compile guards

All of these are already defined in the headers provided.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
3593f37fd7b599e217bd1f894ac671a14a058b8d 14-Jul-2015 Emil Velikov <emil.l.velikov@gmail.com> egl: remove custom string functions

Support for Windows has been removed for a while now, and virtually
every POSIX compliant system provides strcasecmp, strdup and snprintf.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
32aa1d769de070c4e8756922571c35deaf12a40a 09-Jun-2015 Marek Olšák <marek.olsak@amd.com> egl: sort extension lists alphabetically

and add the missing KHR_gl_colorspace case.
/external/mesa3d/src/egl/main/eglapi.c
a1cb407b049bb431b0f6f21e6e376d11f136af67 11-May-2015 Marek Olšák <marek.olsak@amd.com> egl: expose EGL 1.5 if all requirements are met

There's no driver support yet, because EGL_KHR_gl_colorspace isn't
implemented.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
51c8c66e1d81d03f0db6aee0a510aa85c277053e 12-May-2015 Marek Olšák <marek.olsak@amd.com> egl: return correct invalid-type error from eglCreateSync

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
820a4d402ad3891ec460882feab3801fbc646a65 12-May-2015 Marek Olšák <marek.olsak@amd.com> egl: add new platform functions (v2)

These are just wrappers around the existing extension functions.

v2: return BAD_ALLOC if _eglConvertAttribsToInt fails

Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
515f04ed6fe0c914b2cd22c7ea65db6e34c362e3 12-May-2015 Marek Olšák <marek.olsak@amd.com> egl: add eglCreateImage (v2)

v2: - use calloc
- return BAD_ALLOC if calloc fails

Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
1e79e054e7dff0c45538fff1257e1f81a206d7c9 12-May-2015 Marek Olšák <marek.olsak@amd.com> egl: add eglGetSyncAttrib (v2)

v2: - don't modify "value" in eglGetSyncAttribKHR after an error
- rename _egl_api::GetSyncAttribKHR -> GetSyncAttrib
- rename GetSyncAttribKHR_t -> GetSyncAttrib_t
- rename _eglGetSyncAttribKHR to _eglGetSyncAttrib

Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
7524592da6305d52e95d718691d5a6665738aade 12-May-2015 Marek Olšák <marek.olsak@amd.com> egl: add eglWaitSync

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
2885ba0e4cea102d77832e2af4b212d00ab5edd4 12-May-2015 Marek Olšák <marek.olsak@amd.com> egl: add EGL 1.5 functions that don't need any changes from extensions

Declare the functions without the suffix, so that the core names are exported.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
d333d30632516b1fc5b60181c2c237653e55a8e1 12-May-2015 Marek Olšák <marek.olsak@amd.com> egl: use EGL 1.5 types without suffixes

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
0e4b564ef288159f16f7a6886b6cfc0110411af8 12-May-2015 Marek Olšák <marek.olsak@amd.com> egl: combine VersionMajor and VersionMinor into one variable

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
efda9c56491f5cb90e77f5fe7979477fc9b2b529 11-May-2015 Marek Olšák <marek.olsak@amd.com> egl: set the EGL version in common code

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
0c4eef6a2cad72571efb15a5fdca2726f0540d07 14-May-2015 Emil Velikov <emil.l.velikov@gmail.com> egl: remove remaining EGL_MESA_copy_context skeleton

With earlier commit (7a58262e58d egl: Remove skeleton implementation of
EGL_MESA_screen_surface) we've removed the skeleton implementation of
eglCopyContextMESA(). Just like EGL_MESA_screen_surface this extension
was never implemented in mesa.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
/external/mesa3d/src/egl/main/eglapi.c
448e01b2918c76dfff8abfbd56a606fdff8c356c 12-May-2015 Emil Velikov <emil.l.velikov@gmail.com> egl/main: fix EGL_KHR_get_all_proc_addresses

The extension requires that the address of the core functions should be
available via eglGetProcAddress. Currently the list is guarded by
_EGL_GET_CORE_ADDRESSES, which was only set for the scons (windows)
build.

Unconditionally enable it for all the builds (automake, android and
haiku) considering that the extension is not platform specific and is
always enabled.

v2: Drop the _EGL_GET_CORE_ADDRESSES macro altogether.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
ffc94e32a38b3948fe4ae2717a3f55802eb8aae8 12-May-2015 Marc-André Lureau <marcandre.lureau@gmail.com> egl: more define fixes for EGL_MESA_image_dma_buf_export

s/EGL_MESA_dma_buf_image_export/EGL_MESA_image_dma_buf_export as defined by the spec
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
e3cc5ad49d2f3f08c29d0b64d1c0c52560789d93 12-May-2015 Emil Velikov <emil.l.velikov@gmail.com> egl/main: expose only core EGL functions statically

The EGL 1.3, 1.4 and 1.5 spec (as quoted below) explicitly mentions that
providing static symbols for functions provided by EGL extensions is not
portable. Considering that relatively recently we've seen a non-mesa
desktop EGL implementation, the fact that we opt for such behaviour has
gone unnoticed.

From the EGL 1.5 specification:
For functions that are queryable with eglGetProcAddress,
implementations may choose to also export those functions
statically from the object libraries implementing those
functions. However, portable clients cannot rely on this
behavior.

To encourage devs against writing such non-portable code, let's hide the
symbols similar to the official binary driver from NVIDIA.

v2: Quote the EGL 1.5 spec, as suggested by Chad.

Cc: Brian Paul <brianp@vmware.com>
Cc: Chad Versace <chad.versace@intel.com>
Cc: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
7a58262e58d8edac3308777def0950032628edee 01-Apr-2015 Adam Jackson <ajax@redhat.com> egl: Remove skeleton implementation of EGL_MESA_screen_surface

No backend wires this up to anything, and the extension spec has been
marked obsolete for 4+ years.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
/external/mesa3d/src/egl/main/eglapi.c
b5045e29917a783be74becee5e72566e2b0e3535 05-May-2015 Dave Airlie <airlied@redhat.com> egl: image_dma_buf_export - use KHR 64-bit type

After talking to Jon Leech he suggested this should be fine.

update spec to the version in the registry.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/egl/main/eglapi.c
290a3eb7507f7f2949753a77c425ed2bb6fd0dd1 10-Apr-2015 Marek Olšák <marek.olsak@amd.com> egl/dri2: implement EGL_KHR_cl_event2 (v2)

v2: fix the SYNC_CONDITION query
/external/mesa3d/src/egl/main/eglapi.c
a8617cc0428dcc8340cb85776e122c6534a0fa11 10-Apr-2015 Marek Olšák <marek.olsak@amd.com> egl/dri2: implement EGL_KHR_wait_sync
/external/mesa3d/src/egl/main/eglapi.c
9a0bda2430f10fbf43c64573412d97b6cc38e5d7 10-Apr-2015 Marek Olšák <marek.olsak@amd.com> egl/dri2: implement EGL_KHR_fence_sync
/external/mesa3d/src/egl/main/eglapi.c
c66c158e59298fc4183148c466dd4eecb945f87c 28-Apr-2015 Marc-André Lureau <marcandre.lureau@gmail.com> egl: misc fixes for EGL_MESA_image_dma_buf_export

Fix define and a function argument name introduced in commit
8f7338f284cdb1fef64c85e3293d2200d0cc6387

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/egl/main/eglapi.c
8f7338f284cdb1fef64c85e3293d2200d0cc6387 03-Mar-2014 Dave Airlie <airlied@redhat.com> egl: add initial EGL_MESA_image_dma_buf_export v2.4

At the moment to get an EGL image to a dma-buf file descriptor,
you have to use EGL_MESA_drm_image, and then use libdrm to
convert this to a file descriptor.

This extension just provides an API modelled on EGL_MESA_drm_image,
to return a dma-buf file descriptor.

v2: update spec for new API proposal
add internal queries to get the fourcc back from intel driver.

v2.1: add gallium pieces.

v2.2: add offsets to spec and API, rename fd->fds, stride->strides
in API. rewrite spec a bit more, add some q/a

v2.3:
add modifiers to query interface and 64-bit type for that (Daniel Stone)
specifiy what happens to num fds vs num planes differences. (Chad Versace)

v2.4:
fix grammar (Daniel Stone)

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/egl/main/eglapi.c
37e3a116f8ae09d0fa894d126d081a1af24ec14f 16-Mar-2015 Dave Airlie <airlied@gmail.com> egl: don't fill client apis string forever.

We never reset the string on eglTerminate, so it grows
for ever on multiple eglInitialise.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/egl/main/eglapi.c
6c6e2a15aa7e8c0fd9a1180a901389c1692992c3 14-Mar-2015 Matt Turner <mattst88@gmail.com> egl: Remove eglQueryString virtual dispatch.

Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
dac2e7deaae2540645a6b485c7d1f47195689116 10-Mar-2015 Matt Turner <mattst88@gmail.com> egl: Create queryable strings in eglInitialize().

Creating/recreating the strings in eglQueryString() is extra work and
isn't thread-safe, as exhibited by shader-db's run.c using libepoxy.

Multiple threads in run.c call eglReleaseThread() around the same time.
libepoxy calls eglQueryString() to determine whether eglReleaseThread()
exists, and our EGL implementation passes a pointer to the version
string to libepoxy while simultaneously overwriting the string, leading
to a failure in libepoxy.

Moreover, the EGL spec says (emphasis mine):

"eglQueryString returns a pointer to a *static*, zero-terminated string"

This patch moves some auxiliary functions from eglmisc.c to eglapi.c so
that they may be used to create the extension, API, and version strings
once during eglInitialize(). The auxiliary functions are renamed from
_eglUpdate* to _eglCreate*, and some checks made unnecessary by calling
the functions from eglInitialize() are removed.

Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
efe87f1a801c61d087cd2b29a2c150453241c3d4 06-Mar-2015 Emil Velikov <emil.l.velikov@gmail.com> egl/main: use c11/threads' mutex directly

Remove the inline wrappers/abstraction layer.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/egl/main/eglapi.c
56ede80940751bfcdaf26e9c23e439d37ef0e96b 06-Mar-2015 Emil Velikov <emil.l.velikov@gmail.com> Revert "egl/main: use c11/threads' mutex directly"

This reverts commit 6cee785c69a5c8d2d32b6807f9c502117f5a74b0.

Not meant to go in yet. Lacking review.
/external/mesa3d/src/egl/main/eglapi.c
6cee785c69a5c8d2d32b6807f9c502117f5a74b0 05-Mar-2015 Emil Velikov <emil.l.velikov@gmail.com> egl/main: use c11/threads' mutex directly

Remove the inline wrappers/abstraction layer.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
d780012cd75c24394b043b107d17eb8199ae2dc7 28-Feb-2015 Emil Velikov <emil.l.velikov@gmail.com> egl/main: replace __FUNCTION__ with __func__

The latter is a C99 standard, and our current wrapper c99_compat.h
should handle non-compliant compilers.
Drop the c99_compat.h inclusion from eglcompiler.h altogether, as it's
no longer required.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/egl/main/eglapi.c
7bd1693877e4de9aaf8f6776649fc48db54ec82b 28-Feb-2015 Emil Velikov <emil.l.velikov@gmail.com> egl/main: replace INLINE with inline

Drop the custom keyword in favour of the C99 one. All the places using
it now directly include c99_compat.h which should handle things on
platforms which lack it.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/egl/main/eglapi.c
400b833592d9aad7b2c4627a897380642d52189f 22-Dec-2014 Alexander von Gluck IV <kallisti5@unixzen.com> egl: Add Haiku code and support

* This is the cleaned up work of the Haiku GCI student
Adrián Arroyo Calle adrian.arroyocalle@gmail.com
* Several patches were consolidated to prevent
unnecessary touching of non-related code
/external/mesa3d/src/egl/main/eglapi.c
7e8ba77c49b3fc0fe56d0ba60acc734d389fd9bd 20-Nov-2014 Chad Versace <chad.versace@linux.intel.com> egl: Expose EGL_KHR_get_all_proc_addresses and its client extension

Mesa already implements the behavior of EGL_KHR_get_all_proc_addresses
and EGL_KHR_client_get_all_proc_addresses. This patch just exposes the
extension strings.

See: https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_get_all_proc_addresses.txt
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/main/eglapi.c
91ff0d4c6510dc38f279c586ced17fba917873e7 03-Jun-2014 Sinclair Yeh <sinclair.yeh@intel.com> egl: Check for NULL native_window in eglCreateWindowSurface

We have customers using NULL as a way to test the robustness of the API.
Without this check, EGL will segfault trying to dereference
dri2_surf->wl_win->private because wl_win is NULL.

This fix adds a check and sets EGL_BAD_NATIVE_WINDOW

v2: Incorporated feedback from idr - moved the check to a higher level
function.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/egl/main/eglapi.c
0ca0d5743fb42a956289a87efd4c8fcda88cf93a 20-Mar-2014 Beren Minor <beren.minor@gmail.com> egl/main: Fix eglMakeCurrent when releasing context from current thread.

EGL 1.4 Specification says that
eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)
can be used to release the current thread's ownership on the surfaces
and context.

MESA's egl implementation was only accepting the parameters when the
KHR_surfaceless_context extension is supported.

[chadv] Add quote from the EGL 1.4 spec.
Cc: "10,1, 10.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/main/eglapi.c
c524f3ef9155caba6cd4f9fc72485426b1da76fd 06-May-2014 Sarah Sharp <sarah.a.sharp@linux.intel.com> egl: Add EGL_CHROMIUM_sync_control extension.

Chromium defined a new GL extension (that isn't registered with Khronos).
We need to add an EGL extension for it, so we can migrate ChromeOS on
Intel systems to use EGL instead of GLX.

http://git.chromium.org/gitweb/?p=chromium/src/third_party/khronos.git;a=commitdiff;h=27cbfdab35c601f70aa150581ad1448d0401f447

The EGL_CHROMIUM_sync_control extension is similar to the GLX extension
OML_sync_control, but only defines one function,
eglGetSyncValuesCHROMIUM, which is equivalent to glXGetSyncValuesOML.

http://www.opengl.org/registry/specs/OML/glx_sync_control.txt

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Jamey Sharp <jamey@minilop.net>
Cc: Ian Romanick <idr@freedesktop.org>
Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
468cc866b4b308cee40470f06b31002c6c56da96 23-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/main: Enable Linux platform extensions

Enable EGL_EXT_platform_base and the Linux platform extensions layered
atop it: EGL_EXT_platform_x11, EGL_EXT_platform_wayland,
and EGL_MESA_platform_gbm.

Tested with Piglit's EGL_EXT_platform_base tests under an X11 session.
To enable running the Wayland and GBM tests, windowed Weston was running
and the kernel had render nodes enabled.

I regression tested my EGL_EXT_platform_base patch set with Piglit on
Ivybridge under X11/EGL, standalone Weston, and GBM with rendernodes. No
regressions found.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/main/eglapi.c
6d1f83ec09164bd805c90785635bbcf861b403e5 07-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/main: Stop using EGLNative types internally

Internally, much of the EGL code uses EGLNativeDisplayType,
EGLNativeWindowType, and EGLPixmapType. However, the EGLNative type
often does not match the variable's actual type.

The concept of EGLNative types are a bad match for Linux, as explained
below. And the EGL platform extensions don't use EGLNative types at all.
Those extensions attempt to solve cross-platform issues by moving the
EGL API away from the EGLNative types.

The core of the problem is that eglplatform.h can define each EGLNative
type once only, but Linux supports multiple EGL platforms.

To work around the problem, Mesa's eglplatform.h contains multiple
definitions of each EGLNative type, selected by feature macros. Mesa
expects EGL clients to set the feature macro approrpiately. But the
feature macros don't work when a single codebase must be built with
support for multiple EGL platforms, *such as Mesa itself*.

When building libEGL, autotools chooses the EGLNative typedefs based on
the first element of '--with-egl-platforms'. For example,
'--with-egl-platforms=x11,drm,wayland' defines the following:

typedef Display* EGLNativeDisplayType;
typedef Window EGLNativeWindowType;
typedef Pixmap EGLNativePixmapType;

Clearly, this doesn't work well for Wayland and GBM. Mesa works around
the problem by casting the EGLNative types to different things in
different files.

For sanity's sake, and to prepare for the EGL platform extensions, this
patch removes from egl/main and egl/dri2 all internal use of the
EGLNative types. It replaces them with 'void*' and checks each explicit
cast with a static assertion. Also, the patch touches egl_gallium the
minimal amount to keep it compatible with eglapi.h.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/main/eglapi.c
551d459af421a2eb937e9e16301bb64da4624f89 07-Mar-2014 Neil Roberts <neil@linux.intel.com> Add the EGL_MESA_configless_context extension

This extension provides a way for an application to render to multiple
surfaces with different buffer formats without having to use multiple
contexts. An EGLContext can be created without an EGLConfig by passing
EGL_NO_CONFIG_MESA. In that case there are no restrictions on the surfaces
that can be used with the context apart from that they must be using the same
EGLDisplay.

_mesa_initialze_context can now take a NULL gl_config which will mark the
context as ‘configless’. It will memset the visual to zero in that case.
Previously the i965 and i915 drivers were explicitly creating a zeroed visual
whenever 0 is passed for the EGLConfig. Mesa needs to be aware that the
context is configless because it affects the initial value to use for
glDrawBuffer. The first time the context is bound it will set the initial
value for configless contexts depending on whether the framebuffer used is
double-buffered.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
/external/mesa3d/src/egl/main/eglapi.c
4b17dff3e5128bef67ea79d20624e878c3b48729 07-Mar-2014 Neil Roberts <neil@linux.intel.com> eglCreateContext: Remove the check for whether config == 0

In eglCreateContext there is a check for whether the config parameter is zero
and in this case it will avoid reporting an error if the
EGL_KHR_surfacless_context extension is supported. However there is nothing in
that extension which says you can create a context without a config and Mesa
breaks if you try this so it is probably better to leave it reporting an
error.

The original check was added in b90a3e7d8b1bc based on the API-specific
extensions EGL_KHR_surfaceless_opengl/gles1/gles2. This was later changed to
refer to EGL_KHR_surfacless_context in b50703aea5. Perhaps the original
extensions specified a configless context but the new one does not.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
/external/mesa3d/src/egl/main/eglapi.c
877128505431adaf817dc8069172ebe4a1cdf5d8 17-Jan-2014 José Fonseca <jfonseca@vmware.com> s/Tungsten Graphics/VMware/

Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.

This was the sed script I used:

$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#

# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g

# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/

# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g

# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/egl/main/eglapi.c
5cddb1ce3c9890435374ae3e03fc4a5b57dee314 28-Oct-2013 Neil Roberts <neil@linux.intel.com> wayland: Add an extension to create wl_buffers from EGLImages

This adds an extension called EGL_WL_create_wayland_buffer_from_image
which adds the following single function:

struct wl_buffer *
eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image);

The function creates a wl_buffer which shares its contents with the given
EGLImage. The expected use case for this is in a nested Wayland compositor
which is using subsurfaces to present buffers from its clients. Using this
extension it can attach the client buffers directly to the subsurface without
having to blit the contents into an intermediate buffer. The compositing can
then be done in the parent compositor.

The extension is only implemented in the Wayland EGL platform because of
course it wouldn't make sense anywhere else.
/external/mesa3d/src/egl/main/eglapi.c
3c58d4c700bc1d0a0d56c26645e900201b7f249e 12-Oct-2013 Chad Versace <chad.versace@linux.intel.com> egl: Enable EGL_EXT_client_extensions

Insert two fields into _egl_global to hold the client extensions and
statically initialize them:
ClientExtensions // a struct of bools
ClientExtensionString

Post-patch, Mesa supports exactly one client extension,
EGL_EXT_client_extensions.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
8d29b5271a2e66fc78436be31ed6748ff006f0cb 18-Jul-2013 Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> egl: Update to Wayland 1.2 server API

Since Wayland 1.2, struct wl_buffer and a few functions are deprecated.

References to wl_buffer are replaced with wl_resource and some getter
functions and calls to deprecated functions are replaced with the proper
new API. The latter changes are related to resource versioning.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
/external/mesa3d/src/egl/main/eglapi.c
0de013b61930505bbeaf094d079b566df18a0cf7 22-Mar-2013 Topi Pohjolainen <topi.pohjolainen@intel.com> egl: definitions for EXT_image_dma_buf_import

As specified in:

http://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt

Checking for the valid fourcc values is left for drivers avoiding
dependency to drm header files here.

v2: enforce EGL_NO_CONTEXT

v3: declare the extension as EGL (not GLES)

v4: do not update eglext.h manually but rely on update from
Khronos instead

v5: (Eric) report invalid context as EGL_BAD_PARAMETER instead of as
EGL_BAD_CONTEXT

v6: (Chad) fix the checking for valid hints. Before all values were
rejected.

v7: (Chad) comment style change from

/**
* Multi-
* line

into

/* Multi-
* line

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/main/eglapi.c
6425b14515e3124d6d1fe2d39fa192389aab9f85 25-Apr-2013 Robert Bragg <robert@sixbynine.org> egl: Add extension infrastructure for EGL_EXT_swap_buffers_with_damage

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
/external/mesa3d/src/egl/main/eglapi.c
b50703aea55450e04bcd8154335774786e0f253b 18-Jul-2012 Ian Romanick <ian.d.romanick@intel.com> egl: Replace KHR_surfaceless_* extensions with KHR_surfaceless_context

KHR extension name is reserved for Khronos ratified extensions, and there is
no such thing as EGL_KHR_surfaceless_{gles1,gles2,opengl}. Replace these
three extensions with EGL_KHR_surfaceless_context since that extension
actually exists.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/main/eglapi.c
e6a33570b73aa56c87818d7f67a122d4427b7841 05-Jul-2012 Kristian Høgsberg <krh@bitplanet.net> egl: Add EGL_WAYLAND_PLANE_WL attribute

This lets us specify the plane to create the image for for multiplanar
wl_buffers.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
/external/mesa3d/src/egl/main/eglapi.c
7d46b45c5bd7d1ab3e32a2722ca65061ca80dc34 14-Dec-2011 Fredrik Höglund <fredrik@kde.org> egl: add EGL_NV_post_sub_buffer

v2: Handle EGL_POST_SUB_BUFFER_SUPPORTED_NV in
_eglParseSurfaceAttribList()

Signed-off-by: Fredrik Höglund <fredrik@kde.org>

[olv: remove #ifdef checks]
/external/mesa3d/src/egl/main/eglapi.c
f63e129d5fef73b0710d294ddc19440d9d388836 20-Dec-2011 Chia-I Wu <olv@lunarg.com> egl: KHR_reusable_sync entrypoints are missing from eglGetProcAddress
/external/mesa3d/src/egl/main/eglapi.c
f957cac772d34b3406be3236b81571e456ee40e8 20-Dec-2011 Chia-I Wu <olv@lunarg.com> egl: remove #ifdef's for official extensions

There is no point in having them when we distribute eglext.h.

As for unofficial extensions, there is a chance that we might remove some of
them evetually. Keeping the #ifdef's for now should make that easier.
/external/mesa3d/src/egl/main/eglapi.c
ed1ff2acec2cdfe3eace9f4caa6cfe5e0f175534 20-Dec-2011 Chia-I Wu <olv@lunarg.com> egl: remove EGL_ANDROID_swap_rectangle

We never support this unofficial extension, and it has been removed from
Android recently. There is no point in keeping it.
/external/mesa3d/src/egl/main/eglapi.c
00b365bc78c131bfd1c19bb22ac55e36f4e8f3c5 01-Oct-2010 Chia-I Wu <olvaffe@gmail.com> egl: add Android-specific extensions

Add EGL_ANDROID_image_native_buffer and EGL_ANDROID_swap_rectangle.
There is no spec for them though.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/egl/main/eglapi.c
85fe9484945cb57ffd49df248b0e5057eba6af04 09-Aug-2011 Benjamin Franzke <benjaminfranzke@googlemail.com> egl: Native Display autodetection

EGL doesnt define howto manage different native platforms.
So mesa has a builtime configurable default platform,
whith non-standard envvar (EGL_PLATFORM) overwrites.
This caused unneeded bugreports, when EGL_PLATFORM was forgotten.

Detection is grouped into basic types of NativeDisplays (which itself
needs to be detected). The final decision is based on characteristcs
of these basic types:

File Desciptor based platforms (fbdev):
- fstat(2) to check for being a fd that belongs to a character device
- check kernel subsystem (todo)

Pointer to structuctures (x11, wayland, drm/gbm):
- mincore(2) to check whether its valid pointer to some memory.
- magic elements (e.g. pointers to exported symbols):
o wayland display stores interface type pointer (first elm.)
o gbm stores pointer to its constructor (first elm.)
o x11 as a fallback (FIXME?)

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
/external/mesa3d/src/egl/main/eglapi.c
f2001df508fda599a18b3586d2775e970a3db13a 02-Jul-2011 Chia-I Wu <olv@lunarg.com> egl: add copyright notices

The list of copyright holders could be incomplete. Please update
directly or notify me if your name is missing.
/external/mesa3d/src/egl/main/eglapi.c
6a661895e946f38b21775bf9cb45ef6b22fab85a 12-May-2011 José Fonseca <jfonseca@vmware.com> egl: Fix int <-> ptr casts.

Based on zhigang gong <zhigang.gong@gmail.com>'s patch.
/external/mesa3d/src/egl/main/eglapi.c
f274dfaca4b53bae92dfe6a72c1890c381d84746 25-Apr-2011 Kristian Høgsberg <krh@bitplanet.net> egl: Use the right extension name in #ifdef
/external/mesa3d/src/egl/main/eglapi.c
6b369c4c7cd8a52f99bbff2a57fb316b33a87495 21-Feb-2011 Benjamin Franzke <benjaminfranzke@googlemail.com> egl: Add EGL_WL_bind_wayland_display
/external/mesa3d/src/egl/main/eglapi.c
a4a38dcf61f141297a083ccac217200947d57b0d 13-Jan-2011 Chia-I Wu <olv@lunarg.com> egl: Cleanup _EGLDisplay initialization.

Reorder/rename and document the fields that should be set by the driver during
initialization. Drop the major/minor arguments from drv->API.Initialize.
/external/mesa3d/src/egl/main/eglapi.c
d19afc57fe49816f3f3290410e0124d326577be2 22-Oct-2010 Chia-I Wu <olv@lunarg.com> egl: Use reference counting to replace IsLinked or IsBound.

Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update
_eglBindContext and drivers to do reference counting.
/external/mesa3d/src/egl/main/eglapi.c
4ce33ec606292d92eff5afad6f50e1acc7109729 22-Oct-2010 Chia-I Wu <olv@lunarg.com> egl: Drop dpy argument from the link functions.

All display resources are already initialized with a display. Linking
simply links a resource to its display.
/external/mesa3d/src/egl/main/eglapi.c
6b2f1561ad66c358a5d6b7a5ed5eb8f550a3b098 23-Sep-2010 Chia-I Wu <olv@lunarg.com> egl: Check extensions.

Do not call into the driver if the extension for the called function is
not enabled.
/external/mesa3d/src/egl/main/eglapi.c
916c8ed2c8f916604166b22e6fcb9433b960a924 09-Sep-2010 Chia-I Wu <olv@lunarg.com> egl: Use _EGL_CHECK_DISPLAY in eglCreateContext.

_EGL_CHECK_DISPLAY checks the display and returns from eglCreateContext
on error.
/external/mesa3d/src/egl/main/eglapi.c
b7a8893a2413adfddf4dc836676a19463fb6ffd7 04-Jun-2010 Kristian Høgsberg <krh@bitplanet.net> egl: Add EGL_MESA_drm_image extension

Create EGLImages from DRM buffer handles.
/external/mesa3d/src/egl/main/eglapi.c
f508c0c09702a5ea53dcb58721f3674605594c6e 19-Aug-2010 Chia-I Wu <olv@lunarg.com> egl: Allow core functions to be queried.

When _EGL_GET_CORE_ADDRESSES is defined, eglGetProcAddress can be used to query
core functions. This is non-standard, but some apps expect it.
/external/mesa3d/src/egl/main/eglapi.c
4eebea74a81ec5fbacf2347ea88cac137ddd4d69 14-Aug-2010 Chia-I Wu <olv@lunarg.com> egl: Add support for EGL_KHR_reusable_sync.

Individual drivers still need to support and enable the extension.
/external/mesa3d/src/egl/main/eglapi.c
b90a3e7d8b1bcd412ddbf2a4803de2756dacd436 03-Jun-2010 Kristian Høgsberg <krh@bitplanet.net> egl: EGL_KHR_surfaceless_* extensions

These extensions allow an application to make a context current by
passing EGL_NO_SURFACE for the write and read surface in the call to
eglMakeCurrent. The motivation is that applications that only want to
render to client API targets (such as OpenGL framebuffer objects)
should not need to create a throw-away EGL surface just to get a
current context.
/external/mesa3d/src/egl/main/eglapi.c
ff318c45ec1fafd0d825a8da5556d2d1e69ff7da 07-Jul-2010 Vinson Lee <vlee@vmware.com> egl: Remove unnecessary headers.
/external/mesa3d/src/egl/main/eglapi.c
f2aa361f3b58a91780c9358b3f8716f6434074c7 04-Jul-2010 Chia-I Wu <olv@lunarg.com> egl: Rework driver loading.

Driver loading is now splitted into two stages. In the first stage, an
_EGLModule is created for each driver: user driver, default drivers, and
all files in the search directories that start with "egl_". Modules are
not loaded at this stage.

In the second stage, each module is loaded to initialize a display. The
process stops at the first module that can initialize the display.

If eglGetProcAddress is called before eglInitialize, the same code path
will be taken to find the first module that supports
EGL_DEFAULT_DISPLAY. Because we do not want to initialize the display,
drv->Probe is used instead in this case.
/external/mesa3d/src/egl/main/eglapi.c
c43ab4fe1fbb13bbfe70680c6c608ff0da73be9a 03-Jul-2010 nobled <nobled@dreamwidth.org> egl: Always use EGLAPIENTRY in api function prototypes

Fixes the build on Windows.
/external/mesa3d/src/egl/main/eglapi.c
78d70ddbbd41d73b7f6040f392eb87758c39dc37 17-Jun-2010 Chia-I Wu <olv@lunarg.com> egl: Add support for EGL_MESA_drm_display.

The extension defines eglGetDRMDisplay that creates an EGLDisplay from a
DRM fd. Calling eglCreateWindowSurace or eglCreatePixmapSurface with
such displays will generate EGL_BAD_NATIVE_WINDOW or
EGL_BAD_NATIVE_PIXMAP.
/external/mesa3d/src/egl/main/eglapi.c
f22665df95406567193dee0089f4830664ff4101 17-Jun-2010 Chia-I Wu <olv@lunarg.com> egl: Introduce platform displays internally.

This commit introduces type-safe platform displays internally. A
platform display consists of a generic pointer and an enum that
specifies the platform.

An EGLDisplay is created from a platform display. Native displays
become platform displays whose platform is determined by
_eglGetNativePlatform(). Platform windows and pixmaps may also be
introduced if needed.
/external/mesa3d/src/egl/main/eglapi.c
1e6c10f4be9e36cc052a6b47fb2cb1eae60caa00 31-May-2010 Chia-I Wu <olv@lunarg.com> egl: Use SConscript for Windows build.

Fix several portability issues and add SConscript for Windows build.
/external/mesa3d/src/egl/main/eglapi.c
12297f1f98c5daf177938b2598e6fb8ed97a9a66 14-May-2010 Vinson Lee <vlee@vmware.com> egl: Silence uninitialized variable warnings.
/external/mesa3d/src/egl/main/eglapi.c
52c554a79d3ed3104a9f7d112faa9129073b5a25 07-May-2010 Kristian Høgsberg <krh@bitplanet.net> egl: Implement EGL_NOK_swap_region

This extension adds a new function which provides an alternative to
eglSwapBuffers. eglSwapBuffersRegionNOK accepts two new parameters in
addition to those in eglSwapBuffers. The new parameters consist of a
pointer to a list of 4-integer blocks defining rectangles (x, y,
width, height) and an integer specifying the number of rectangles in
the list.
/external/mesa3d/src/egl/main/eglapi.c
681fd73f1e95d43425b946a250b241bfdb0ce1c8 13-May-2010 Kristian Høgsberg <krh@bitplanet.net> egl: Allow a prioritized list of default drivers

When there is no user driver or any matching display drivers we fall
back to the default driver. This patch lets us have a list of default
drivers instead of just one. The drivers are loaded in turn and we
attempt to initialize the display. If it fails we unload the driver
and move on to the next one.

Compared to the display driver mechanism, this avoids loading a number
of drivers and then only using one. Also, we call Initialize to see
if the driver will work instead of relying on Probe. To know for sure
that a driver will work, Probe really have to do a full Initialize, so
we will just use Initialize directly.
/external/mesa3d/src/egl/main/eglapi.c
bef4b476d729320599264483113d577ac5eeaff1 18-Feb-2010 Chia-I Wu <olv@lunarg.com> egl: Silence warnings in check/return macros.

The macros give warnings when compiled with -pedantic. This commit is
based on a patch by Brian Paul, with minor changes to add do {} while(0)
and rename the check macros.
/external/mesa3d/src/egl/main/eglapi.c
655f4654675e601a9482e40d8e50156c965b8934 17-Feb-2010 Chia-I Wu <olv@lunarg.com> egl: Always lock a display before using it.

This gives a simple access control to the display. It is potentially
slow, but a finer grained mutex can always be used in the future. The
benefit of this simple approach is that drivers need not to worry about
thread-safety.
/external/mesa3d/src/egl/main/eglapi.c
db5ce8b3843a03c6f83a02a79f033d7e74784dd5 17-Feb-2010 Chia-I Wu <olv@lunarg.com> egl: Make eglGetDisplay atomic.

Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay. Remove
unused _eglUnlinkDisplay.
/external/mesa3d/src/egl/main/eglapi.c
b3bb18062005d3c9ec0f942a5e096e7e38c6f3e1 17-Feb-2010 Chia-I Wu <olv@lunarg.com> egl: eglGetError should return the status of the last call.

Use macros to record the status of the function call before returning.
This is the only way that eglGetError can return the status of the most
recent function call.
/external/mesa3d/src/egl/main/eglapi.c
aed7358e54fd143033d240c6e543d403da2d7336 17-Feb-2010 Chia-I Wu <olv@lunarg.com> egl: Use new error checking macros.

Replace all uses of _EGL_DECLARE_* and _eglCheck* by _EGL_CHECK_*.
/external/mesa3d/src/egl/main/eglapi.c
f3e03e1277839cddc35e0cc3427a7972bc17a10a 17-Feb-2010 Chia-I Wu <olv@lunarg.com> egl: Add new error checking macros.

Add _EGL_CHECK_* which will replace _EGL_DECLARE_* for error checking.
Move _eglCheck* earlier in the file so that the macros and the functions
are grouped together.
/external/mesa3d/src/egl/main/eglapi.c
94cb321b5d246185abf71d89968d472a626f1a23 29-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Clean up header inclusions.

Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
/external/mesa3d/src/egl/main/eglapi.c
45ba53324341234144ca02122bf2c0b5ef58c361 28-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Correctly unbind contexts in eglReleaseThread.

MakeCurrent unbinds the current context of the current API. Modify the
current API to make sure all contexts are correctly unbound.
/external/mesa3d/src/egl/main/eglapi.c
17330479b39409a63a06ec9e6b0f8e28b585db12 27-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: eglMakeCurrent should accept an uninitialized display.

When no context or surface are given, the display is allowed to be
uninitialized. Most drivers cannot handle an uninitialized display.
But they are updated to at least throw a fatal message.
/external/mesa3d/src/egl/main/eglapi.c
a933259daa98615ad7473c53623a96f612e9a311 27-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Use a boolean to indicate whether a display is initialized.

The driver pointer of the display was used to decide whether a display
is initialized. Use a boolean for that purpose allows accessing the
driver of an uninitialized display.
/external/mesa3d/src/egl/main/eglapi.c
092b1ca989ba3bdc3f4d421b83b3943af260b7db 26-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Remove _eglOpenDriver and _eglCloseDriver.

_eglCloseDriver is no-op and _eglOpenDriver does nothing but call
_eglMatchDriver. Export _eglMatchDriver directly.
/external/mesa3d/src/egl/main/eglapi.c
a1717970e78d897f527273278bf1346cc86a5741 26-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Remove _eglGetCurrentSurface and _eglGetCurrentDisplay.

They have little use in drivers since drivers need to work for multiple
current contexts.
/external/mesa3d/src/egl/main/eglapi.c
11cf3cb2c463cf8af8a7e63eb9521979bfd303f8 26-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Fix leaks in eglReleaseThread.

There may be multiple bound contexts that should be unbound.
/external/mesa3d/src/egl/main/eglapi.c
4aed0944f4b8b8d14d210cf6bc87ccddfa9a77ec 25-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Native types are renamed in EGL 1.3.

Rename Native*Type to EGLNative*Type.
/external/mesa3d/src/egl/main/eglapi.c
a1c4a8a3c855d52fbfef10023b9a8f116e163a97 15-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: Add support for EGL_KHR_image.

Individual drivers still need to implement the API hooks.
/external/mesa3d/src/egl/main/eglapi.c
95f8f75ad8bdb1d8e1cc16ea91fed8c407c36abd 15-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: Update headers.

Update to the current versions found at
http://www.khronos.org/registry/egl/. There is one modification in
khrplatform.h for GCC visibility.
/external/mesa3d/src/egl/main/eglapi.c
ecb3b3102a3022e31cf9d75ae099eddbe298517f 24-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Make surfaces and contexts resources.

Turn _EGLSurface and _EGLContext into _EGLResource so that they can be
managed uniformly.
/external/mesa3d/src/egl/main/eglapi.c
57929eda3e876dc60be7060237a669f042be2376 19-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Use _eglPreloadDrivers.

Replace the use of _eglPreloadDriver by _eglPreloadDrivers. The latter
supports EGL_DISPLAY which have a better chance to "just work".
/external/mesa3d/src/egl/main/eglapi.c
3e6139d158a054a0dfe8def28bf60201cdb9f385 12-Jan-2010 Chia-I Wu <olvaffe@gmail.com> egl: Add _EGLDriver as the first argument to GetProcAddress.

The rest of the driver API has it as the first argument. It should be
there so that a driver has access to itself.
/external/mesa3d/src/egl/main/eglapi.c
6c21c8862bc6edc9cddf3b6eb6f276961099a7a8 28-Sep-2009 Chia-I Wu <olvaffe@gmail.com> egl: Rework the synchronization primitives.

This adds error checking to the synchronization primitives. And
eglWaitGL is now implemented by eglWaitClient.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
57da499d7ba074128e8c97b8076805e403a2b9c4 15-Oct-2009 Chia-I Wu <olvaffe@gmail.com> egl: Rework eglSwapInterval.

This adds error checking to eglSwapInterval and clamps the swap
interval.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
bbfd0e26151bef567c152c8018ecc15f04c70914 15-Oct-2009 Chia-I Wu <olvaffe@gmail.com> egl: Rework error checking in eglSwapBuffers.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
aaa1253b09a6a38e7fcd695aa36e89b9d4bd8dfe 30-Sep-2009 Chia-I Wu <olvaffe@gmail.com> egl: Update comments about eglapi.c.

Mention that opaque handles are looked up and checked.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
61906631202af855d0742586956ff9f34522a525 30-Sep-2009 Chia-I Wu <olvaffe@gmail.com> egl: Rework error checking in eglGetCurrentSurface.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
310c76812e5a2013dad36fc9d1686f57e7b1e626 17-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: Allow binding to any client API.

As a result, EGL_NONE is no longer a valid client API. And it is
possible that no config supports the current bound API.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
e787ffcd02cac9085ac69f631cce235d1cad59c9 28-Sep-2009 Chia-I Wu <olvaffe@gmail.com> egl: Preload a driver if eglGetProcAddress is called early.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
9061d733d3f31293c145cf3b7a0f71c1bfd31989 15-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: Remove core functions from eglGetProcAddress.

eglGetProcAddress may not be used to query core (non-extension)
functions.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
ccc2b0bc65b02d4582d52d133290c8cb046bce8f 13-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: _eglCloseDriver should be no-op.

Move drv->API.Terminate call to eglTerminate. Remove
_eglReleaseDisplayResource as drivers are doing it.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
5a2c9372a0d9fa1efd924f9386a4e3df47c17d0e 13-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: Some per-driver data should be per-display.

Move some fields of _EGLDriver to _EGLDisplay. It also becomes
unnecessary to pass _EGLDisplay to drivers when _eglMain is called.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
0eaa02c836821556c1e8d0141f49f57e23f2548d 13-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: Change the way drivers are loaded.

Driver is chosen and preloaded when eglGetDisplay is called. Later when
eglInitialize is called, the same driver is matched to initialize the
display. Also, add new, but unused, hooks to EGLDriver to allow a
driver to probe a display or unload itself.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
2f2cf461c57974abd89e4917945cc8ae6a67a72e 11-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: Overhaul driver API.

The motivation is so that drivers do not need to look up and check for
bad display, context, and etc. It also becomes unnecessary for drivers
to call the link functions.

This commit makes eglapi.[ch] do the lookup and check. As a result, the
driver API is overhauled, and almost all sources and drivers need
update. The updates are mainly find and replace with human brains.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
0e3687e33dd482115c1a0e39c50b424936cb05a6 10-Aug-2009 Chia-I Wu <olvaffe@gmail.com> egl: Make _eglGlobal initialize statically.

Now that display and surface hash tables are moved out, _eglGlobal can
be initialized statically.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
be9d1ab171b1b29108c781af84dd500707a12925 17-Jul-2009 Chia-I Wu <olvaffe@gmail.com> egl: Return the same EGL Display for the same native display.

The latest revision of the spec explicitly requires the same handle to
be returned for the same native display.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
18457cb263e3e062e12314e7b3d5c81a7f2ba048 17-Jul-2009 Chia-I Wu <olvaffe@gmail.com> egl: Add funtions to link contexts and surfaces to displays.

EGL contexts and surfaces are resources of displays. They should be
managed by displays. This commit adds a bunch of functions to
egldisplay.c to help establish the links between contexts/surfaces and
displays. How links are established is considered opaque outside
display. Functions like _eglGetSurfaceHandle or _eglLookupSurface are
therefore moved to egldisplay.c, with some small modifications.

The idea is also extended to display. That is, displays need to link to
themselves to be looked up.

This commit only adds the functions. A commit to use them should
follow.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
21b635ffa8b59049a95d50d4c7b7a8ff6413b730 17-Jul-2009 Chia-I Wu <olvaffe@gmail.com> egl: Extend per-thread info for multiple current contexts.

EGL allows multiple current contexts, as long as they are bound to
different client APIs.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
75da80b29556e6dbbba21e5297ca440e475f65cb 17-Jul-2009 Chia-I Wu <olvaffe@gmail.com> egl: Support per-thread info.

This commit introduces a "current" system to manage per-thread info. It
uses TLS, if GLX_USE_TLS is defined, or pthread, if PTHREADS is defined.
If none of them are defined, it uses a dummy implementation that is just
like before.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
/external/mesa3d/src/egl/main/eglapi.c
7e2458c7b55b2662067d8cce8a962d8c2bbd3a43 06-Aug-2008 Jonathan White <jwhite@tungstengraphics.com> egl: fix version handling
/external/mesa3d/src/egl/main/eglapi.c
e3805cad0d15ed25ce8f6c5a1f1ea913e5d0986a 30-May-2008 Brian Paul <brian.paul@tungstengraphics.com> egl: new eglGetProcAddress() code

The idea is to pass the call down to the device driver where an API-specific
query can be made. Untested.
/external/mesa3d/src/egl/main/eglapi.c
d5078b94323241a6482f54797756116b1c864327 30-May-2008 Brian Paul <brian.paul@tungstengraphics.com> egl: clean-up re-org of the client API state
/external/mesa3d/src/egl/main/eglapi.c
1c73b4ba86b424ba66a16c4006a57db505bd3ca3 30-May-2008 Brian Paul <brian.paul@tungstengraphics.com> egl: added Name field to _EGLDriver so a driver name string can propogate up through EGL_VERSION string
/external/mesa3d/src/egl/main/eglapi.c
c56e15b093c367e7e17ebd2e153baab8cafd213a 28-May-2008 Brian Paul <brian.paul@tungstengraphics.com> egl: make sure EGL_VERSION_STRING query returns same version as eglInitialize()
/external/mesa3d/src/egl/main/eglapi.c
0c8908c411c434eda318b41b4f2a370a1e794831 28-May-2008 Brian Paul <brian.paul@tungstengraphics.com> egl: added args string to _eglMain()
/external/mesa3d/src/egl/main/eglapi.c
6052af172f0241e6678cd16efac0a0f14f40146c 28-May-2008 Brian Paul <brian.paul@tungstengraphics.com> minor overhaul/re-org of driver selection/loading code
/external/mesa3d/src/egl/main/eglapi.c
721ba15bf4596b2e9589e7656005b387724875c3 27-May-2008 Brian Paul <brian.paul@tungstengraphics.com> added _eglGet*Handle() functions

These are the inverse of the _eglLookup*() functions.
Returns the public handle for a private surface/config/display/etc.
Removes glapi.c's direct access of private fields.
/external/mesa3d/src/egl/main/eglapi.c
5f8a4f3e5e8fe78f1abe9ca6dd1131ad53d3d943 27-May-2008 Brian Paul <brian.paul@tungstengraphics.com> added EGL_OPENGL_API case
/external/mesa3d/src/egl/main/eglapi.c
5e7dba541298a29f175f9d077bf6f63030465d94 27-May-2008 Brian Paul <brian.paul@tungstengraphics.com> eliminate the context hash table

In EGL 1.4 the opaque EGLContext type is a pointer so we can just cast
between public EGLContext handles and private _EGLContext pointers.
/external/mesa3d/src/egl/main/eglapi.c
1ed1027e886980b9b0f48fa6bfcf3d6e209c7787 27-May-2008 Brian Paul <brian.paul@tungstengraphics.com> assorted changes to compile with new EGL 1.4 headers (untested)
/external/mesa3d/src/egl/main/eglapi.c
b2006a40eb22899d38cd31691640555228e36975 30-Jan-2006 Brian Paul <brian.paul@tungstengraphics.com> some initial EGL 1.2 work
/external/mesa3d/src/egl/main/eglapi.c
48822796339cb4a55714dc3f1abbe379562ec538 10-Dec-2005 Brian Paul <brian.paul@tungstengraphics.com> Some initial per-thread support.
Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
/external/mesa3d/src/egl/main/eglapi.c
daf585d0f00df1d4d2e8dc5b465dad60a4bf0122 24-Nov-2005 Brian Paul <brian.paul@tungstengraphics.com> Move all the EGL API function pointers into a new _egl_api struct.
/external/mesa3d/src/egl/main/eglapi.c
198d6d05b033ece21d094c46390ec0faa7612939 17-May-2005 Brian Paul <brian.paul@tungstengraphics.com> remove eglQueryDisplayMESA()
/external/mesa3d/src/egl/main/eglapi.c
f9bad3dfea43d792876c3a7221b9cfcd107085eb 16-May-2005 Brian Paul <brian.paul@tungstengraphics.com> use EGLint instead of unsigned long for eglCopyContextMESA, added comments
/external/mesa3d/src/egl/main/eglapi.c
1c606a9aa1d1fa79fe5c92f42651385917322d5f 14-May-2005 Jon Smirl <jonsmirl@gmail.com> Add empty placeholder for eglCopyContextMESA
/external/mesa3d/src/egl/main/eglapi.c
7012d01d888d482f2c6ad1180231a482026d213a 13-May-2005 Jon Smirl <jonsmirl@gmail.com> First attempt at getting egl support up on dumb framebuffer.
Seems to be mostly working. Not all of egl API is implemented.
/external/mesa3d/src/egl/main/eglapi.c
c22990c29a5cdff89e6e3914aa565acc88a6a407 04-May-2005 Brian Paul <brian.paul@tungstengraphics.com> sync with latest EGL_MESA_screen_surface spec (EGLScreenMESA handles)
/external/mesa3d/src/egl/main/eglapi.c
adbff7e977c7c768e752a24fb643d68bdf961bfe 22-Apr-2005 Brian Paul <brian.paul@tungstengraphics.com> initial EGL code
/external/mesa3d/src/egl/main/eglapi.c