| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
|
|
|
|
|
|
| |
Cc: 10.6 10.5 10.4 <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would generate EGL_BAD_CONFIG because _eglGetContextAPIBit
returns zero for the combination of EGL_OPENGL_ES_API and a major
version > 3. By just returning zero, the caller can't tell the
difference between a bad version (which should generate
EGL_BAD_MATCH) and a bad API (which should generate
EGL_BAD_CONFIG). This patch causes us to filter out major
versions > 3 at a point where we can generate the correct error.
Fixes gles3 Khronos CTS test:
egl_create_context.egl_create_context
V2: Fix commit message as suggested by Ian.
Cc: <[email protected]>
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
| |
This reverts commit 1456ed85f0ed8b9c9f0abd6bd389a089fa3824b2.
_eglInitResource can and is supposed to be called on subclass objects.
Acked-by: Juha-Pekka Heikkila <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
_eglInitResource() was used to memset entire _EGLContext by
writing more than size of pointed target. This does work
as long as Resource is the first element in _EGLContext,
this patch fixes such dependency.
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/[email protected]/[email protected]/
s/[email protected]/[email protected]/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\[email protected]/[email protected]/g
s/keithw\[email protected]/[email protected]/g
s/[email protected]/[email protected]/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/[email protected]/[email protected]/
# 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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
|
|
|
|
|
|
|
| |
Version 12 of the EGL_KHR_create_context spec changed this behavior.
NOTE: This is a candidate for the 9.0 branch
Reviewed-by: Chad Versace <[email protected]>
|
|
|
|
|
|
|
|
| |
We want to check whether there are bits set outside of the valid flags.
Fixes piglit test egl-create-context-invalid-flag-gl
Reviewed-by: Ian Romanick <[email protected]>
|
|
|
|
|
|
|
| |
In the DRI2 back-end this will get the same API as GLES 2.0.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The list of copyright holders could be incomplete. Please update
directly or notify me if your name is missing.
|
|
|
|
|
|
|
|
|
|
| |
This call sequence
eglMakeCurrent(dpy, surf, surf, ctx1);
eglMakeCurrent(dpy, surf, surf, ctx2);
should be valid if ctx1 and ctx2 have the same client API and are not
current in another thread.
|
|
|
|
|
| |
Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update
_eglBindContext and drivers to do reference counting.
|
|
|
|
|
| |
This is a really simple mechanism. There is no atomicity and the caller
is expected to hold the display lock.
|
|
|
|
| |
We do not want them to be all over the places.
|
|
|
|
| |
Replace SET_CONFIG_ATTRIB/GET_CONFIG_ATTRIB by direct dereferences.
|
|
|
|
|
|
|
|
|
|
| |
Remove the hard-to-get-right _eglBindContextToSurfaces. As well as fix
an assertion failure from b90a3e7d8b1bcd412ddbf2a4803de2756dacd436 when
such call sequence is hit
eglMakeCurrent(dpy, surf1, surf1, ctx1);
eglMakeCurrent(dpy, surf2, surf2, ctx2);
eglMakeCurrent(dpy, surf1, surf1, ctx1);
|
|
|
|
|
|
|
| |
The API of the context was not checked against EGL_RENDERABLE_TYPE when there
was no attribute list. Move the check to _eglInitContext, and be verbose about
common mistakes (EGL_RENDERABLE_TYPE not set, EGL_CONTEXT_CLIENT_VERSION not
set, or eglBindAPI not called).
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The last commit incorrectly moved the code under an "else".
|
|
|
|
|
|
| |
0a82fadcdd0b6ebbc345c7c302da0e0efce40a98 seems to trigger a bug in
_eglBindContext. Rework the logics yet again. It is simpler, and
hopefully correct this time.
|
|
|
|
|
|
| |
There is no effective changes given how the function is called. It is
still not trivial, but it should be more readable and resemble
_eglBindContextToThread a lot.
|
|
|
|
|
|
| |
When a newly bound context is the same as the previously bound one,
_eglBindContextToThread should still return the context instead of NULL.
This gives the driver a chance to flush the context.
|
|
|
|
|
|
|
| |
Change _eglInitSurface, _eglInitContext, and _eglInitImage to take an
_EGLDisplay instead of an _EGLDriver. This is a more natural form, and
plus, the display encodes information such as the extensions supported
that might be required for attribute list parsing.
|
|
|
|
|
| |
Refactor attribute list parsing code to _eglParseContextAttribList. Add
a check to make sure the config supports the client API.
|
|
|
|
|
|
| |
They are either unit tests or to demonstrate how functions are supposed
to be used. The unit test is outdated and it should be better to take a
look at any of the working drivers to see how a function is used.
|
|
|
|
|
| |
A context can be bound to a surface just like it can be bound to a
thread. CurrentContext is a more consistent name.
|
|
|
|
| |
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
|
|
|
|
|
| |
_eglMakeCurrent is a big hammer that is not easy to use. Migrate
drivers to use _eglBindContext and un-export _eglMakeCurrent.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
It works similar to _eglMakeCurrent, except that the old context and
surfaces are returned instead of destroyed. _eglMakeCurrent is now
calling the new _eglBindContext.
|
|
|
|
|
| |
Refactor _eglMakeCurrent into _eglCheckMakeCurrent,
_eglBindContextToSurface, and _eglBindContextToThread.
|
|
|
|
|
| |
Turn _EGLSurface and _EGLContext into _EGLResource so that they can be
managed uniformly.
|
|
|
|
|
| |
Move functions to where they should be. There should be no real change
here.
|
|
|
|
| |
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Now that a current surface points back to its binding context, and a
current context points back to its binding thread, make sure there is no
dangling pointers. This commit reworks eglMakeCurrent, adds more checks
to avoid stealing context or surfaces from another thread, and correctly
destroys unlinked context and surfaces.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
| |
IsBound tells if a context or surface is current. What it does not tell
is, to which thread a context is current, or to which context a surface
is current. This commit replaces IsBound by a pointer to the binding
thread or context.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
| |
A context or surface that is neither linked to a display nor current to
a thread should be destroyed. Therefore, an unlinked context or surface
implies a pending delete automatically.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
| |
This commit uses the newly introduced link functions to manage EGL
contexts and surfaces. As a result of this, the API for drivers are
changed. All drivers are updated for the change.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
| |
EGL allows multiple current contexts, as long as they are bound to
different client APIs.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|