summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglcurrent.h
Commit message (Collapse)AuthorAgeFilesLines
* egl: Track EGL_KHR_debug state when going through EGL API calls (v3)Kyle Brenneman2016-10-051-0/+22
| | | | | | | | | | | | | | | | | | | | | | 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>
* egl: Add storage for EGL_KHR_debug's state to EGL objectsKyle Brenneman2016-09-141-0/+8
| | | | | Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* EGL: Combine the GL and GLES current contexts (v2)Kyle Brenneman2016-09-071-37/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* egl: treat EGL_OPENGL_API as invalid on AndroidEmil Velikov2016-08-301-1/+7
| | | | | | | | At the moment one can use OpenGL in eglBindAPI() only to clear the EGL_OPENGL_BIT from RenderableType and Conformant for _each_ config. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org>
* Revert "egl: Check if API is supported when using eglBindAPI."Marek Olšák2016-06-031-1/+10
| | | | | | This reverts commit e8b38ca202fbe8c281aeb81a4b64256983f185e0. It broke Glamor for Gallium at least.
* egl: Check if API is supported when using eglBindAPI.Plamena Manolova2016-06-021-10/+1
| | | | | | | | | 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>
* egl: Add needed extern "C" for C++ accessAlexander von Gluck IV2015-05-141-0/+8
| | | | | | * Haiku's egl driver is C++ due to the interface natively being C++ Reviewed-⁠by: Brian Paul <brianp@vmware.com>
* egl/main: no longer export internal functionEmil Velikov2015-03-051-4/+4
| | | | | | | | | | | | With the split of the gallium egl module we had previously it required access to some of the internal functions. As the only build (automake) that did this no longer builds it we can now appropriately hide those functions. Cc: 10.5 <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* egl/main: replace INLINE with inlineEmil Velikov2015-03-051-3/+4
| | | | | | | | | | 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>
* egl/dri2: Add plumbing for EGL_OPENGL_ES3_BIT_KHRChad Versace2013-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes error EGL_BAD_ATTRIBUTE in the tests below on Intel Sandybridge: * piglit egl-create-context-verify-gl-flavor, testcase OpenGL ES 3.0 * gles3conform, revision 19700, when runnning GL3Tests with -fbo This plumbing is added in order to comply with the EGL_KHR_create_context spec. According to the EGL_KHR_create_context spec, it is illegal to call eglCreateContext(EGL_CONTEXT_MAJOR_VERSION_KHR=3) with a config whose EGL_RENDERABLE_TYPE does not contain the EGL_OPENGL_ES3_BIT_KHR. The pertinent portion of the spec is quoted below; the key word is "respectively". * If <config> is not a valid EGLConfig, or does not support the requested client API, then an EGL_BAD_CONFIG error is generated (this includes requesting creation of an OpenGL ES 1.x, 2.0, or 3.0 context when the EGL_RENDERABLE_TYPE attribute of <config> does not contain EGL_OPENGL_ES_BIT, EGL_OPENGL_ES2_BIT, or EGL_OPENGL_ES3_BIT_KHR respectively). To create this patch, I searched for all the ES2 bit plumbing by calling `git grep "ES2_BIT\|DRI_API_GLES2" src/egl`, and then at each location added a case for ES3. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* egl: add copyright noticesChia-I Wu2011-07-021-0/+28
| | | | | The list of copyright holders could be incomplete. Please update directly or notify me if your name is missing.
* egl: Clean up header inclusions.Chia-I Wu2010-01-301-0/+1
| | | | Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
* egl: Remove _eglGetCurrentSurface and _eglGetCurrentDisplay.Chia-I Wu2010-01-261-8/+0
| | | | | They have little use in drivers since drivers need to work for multiple current contexts.
* egl: Add _eglGetAPIContext.Chia-I Wu2010-01-261-0/+4
| | | | It will return the currently bound context of the given API.
* egl: Fix breakage from -fvisibility=hidden.Chia-I Wu2010-01-051-5/+5
| | | | | | Mark EGL API and driver functions as PUBLIC. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: Allow binding to any client API.Chia-I Wu2009-10-131-8/+15
| | | | | | | 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>
* egl: Initialize current thread management on demand.Chia-I Wu2009-08-111-8/+0
| | | | | | | | | | Current thread management was initialized in _eglInitGlobals, which is called only in eglGetDisplay. Since EGL does not require eglGetDisplay to be called first, the initialization is better to be done on demand. _eglFiniCurrent is removed, as it is not called at all. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: commit missing eglcurrent.[ch] filesBrian Paul2009-07-171-0/+92
Not sure how these got left out from earlier commit.