summaryrefslogtreecommitdiffstats
path: root/src/egl/main
Commit message (Collapse)AuthorAgeFilesLines
* egl: Add an include for size_tThomas Hellstrom2010-11-091-1/+1
| | | | Signed-off-by: Thomas Hellstrom <[email protected]>
* st/egl: Add support for EGL_MATCH_NATIVE_PIXMAP.Chia-I Wu2010-11-031-1/+1
| | | | | Added for completeness. It makes sense to have such mechanism, but I am not aware of any user of that..
* egl: Set up the pthread key even TLS is used.Chia-I Wu2010-11-031-27/+13
| | | | | We have to rely on the pthread key destructor to free the current thread info when a thread exits.
* egl: Rework _eglGetSearchPath.Chia-I Wu2010-11-022-20/+50
| | | | | So that the directory part of EGL_DRIVER, if exists, is prepended to the search path. This commit also adds a sanity check to _eglLog.
* scons: Revamp how to specify targets to build.José Fonseca2010-11-012-46/+47
| | | | | | | | | | | | | | | | | | | | | | Use scons target and dependency system instead of ad-hoc options. Now is simply a matter of naming what to build. For example: scons libgl-xlib scons libgl-gdi scons graw-progs scons llvmpipe and so on. And there is also the possibility of scepcified subdirs, e.g. scons src/gallium/drivers If nothing is specified then everything will be build. There might be some rough corners over the next days. Please bare with me.
* egl: Remove unnecessary headers.Vinson Lee2010-10-273-4/+0
|
* egl: Fix a false negative check in _eglCheckMakeCurrent.Chia-I Wu2010-10-231-9/+12
| | | | | | | | | | 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.
* egl: Use reference counting to replace IsLinked or IsBound.Chia-I Wu2010-10-236-118/+57
| | | | | Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update _eglBindContext and drivers to do reference counting.
* egl: Add reference count for resources.Chia-I Wu2010-10-2310-11/+146
| | | | | This is a really simple mechanism. There is no atomicity and the caller is expected to hold the display lock.
* egl: Fix _eglModeLookup.Chia-I Wu2010-10-234-53/+32
| | | | | | | | | | Internally a mode belongs to a screen. But functions like eglGetModeAttribMESA treat a mode as a display resource: a mode can be looked up without a screen. Considering how KMS works, it is better to stick to the current implementation. To properly support looking up a mode without a screen, this commit assigns each mode (of all screens) a unique ID.
* egl: Minor changes to the _EGLScreen interface.Chia-I Wu2010-10-232-88/+47
| | | | | Make _eglInitScreen take a display and rename _eglAddScreen to _eglLinkScreen. Remove unused functions.
* egl: Minor changes to the _EGLConfig interface.Chia-I Wu2010-10-232-32/+29
| | | | | Mainly to rename _eglAddConfig to _eglLinkConfig, along with a few clean ups.
* egl: Drop dpy argument from the link functions.Chia-I Wu2010-10-237-28/+27
| | | | | All display resources are already initialized with a display. Linking simply links a resource to its display.
* egl: Move fallback routines to eglfallbacks.c.Chia-I Wu2010-10-2217-465/+102
| | | | We do not want them to be all over the places.
* egl: Parse image attributes with _eglParseImageAttribList.Chia-I Wu2010-10-222-0/+25
| | | | Avoid code duplications.
* egl: Move attributes in _EGLImage to _EGLImageAttribs.Chia-I Wu2010-10-223-22/+36
| | | | | | The opaque nature of EGLImage implies that extensions almost always define their own attributes. Move attributes in _EGLImage to _EGLImageAttribs and add a helper function to parse attribute lists.
* egl_glx: Drop the use of [SG]ET_CONFIG_ATTRIB.Chia-I Wu2010-10-221-7/+0
| | | | | _EGLConfig can be directly dereferenced now. Since egl_glx is the last user of the macros, drop the macros too.
* egl: Access config attributes directly.Chia-I Wu2010-10-143-143/+76
| | | | Replace SET_CONFIG_ATTRIB/GET_CONFIG_ATTRIB by direct dereferences.
* egl: Use attribute names as the _EGLConfig member names.Chia-I Wu2010-10-142-69/+97
| | | | | This makes _EGLConfig more accessible and scales better when new attributes are added.
* egl: remove duplicated includeNicolas Kaiser2010-09-301-1/+0
| | | | | | Remove duplicated include. Signed-off-by: Brian Paul <[email protected]>
* egl: Check extensions.Chia-I Wu2010-09-301-11/+41
| | | | | Do not call into the driver if the extension for the called function is not enabled.
* st/egl: Rename kms backend to drm.Chia-I Wu2010-09-192-2/+2
| | | | | The main use of the backend is to support EGL_MESA_drm_display. drm should be a better name.
* egl: Simplify _eglBindContext.Chia-I Wu2010-09-101-77/+31
| | | | | | | | | | 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);
* eglglx: Convert glx visuals/fbconfigs straight to EGL configsKristian Høgsberg2010-09-094-150/+0
| | | | In other words, skip the __GLcontextModes middle man.
* egl: Use _EGL_CHECK_DISPLAY in eglCreateContext.Chia-I Wu2010-09-101-1/+1
| | | | | _EGL_CHECK_DISPLAY checks the display and returns from eglCreateContext on error.
* egl: Display may be NULL in _eglLookup*.Chia-I Wu2010-09-103-3/+3
| | | | This fixes several NULL dereferences.
* egl: Add EGL_MESA_drm_image extensionKristian Høgsberg2010-08-254-0/+55
| | | | Create EGLImages from DRM buffer handles.
* egl: Fix context API check and be verbose.Chia-I Wu2010-08-202-11/+16
| | | | | | | 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).
* egl: Add egl.def for win32 build.Chia-I Wu2010-08-202-1/+36
| | | | | Without the .def file, function names are decorated and cannot be queried by GetProcAddress easily.
* egl: Allow core functions to be queried.Chia-I Wu2010-08-202-1/+39
| | | | | When _EGL_GET_CORE_ADDRESSES is defined, eglGetProcAddress can be used to query core functions. This is non-standard, but some apps expect it.
* st/egl: Fix win32 build.Chia-I Wu2010-08-191-0/+1
| | | | Add new source files to SConscripts.
* egl: Add support for EGL_KHR_fence_sync.Chia-I Wu2010-08-174-1/+11
| | | | Individual drivers still need to support and enable the extension.
* egl: Add support for EGL_KHR_reusable_sync.Chia-I Wu2010-08-179-2/+388
| | | | Individual drivers still need to support and enable the extension.
* egl: Fix '_eglAddAtExitCall' implicit declaration warning.Vinson Lee2010-07-311-0/+1
|
* egl: Add checks for EGL_MESA_screen_surface.Chia-I Wu2010-07-3110-21/+91
| | | | | This allows Mesa EGL to be compiled with eglext.h that does not define EGL_MESA_screen_surface.
* egl: Fix deref before NULL-checkKristian Høgsberg2010-07-281-1/+2
|
* egl: EGL_KHR_surfaceless_* extensionsKristian Høgsberg2010-07-284-36/+67
| | | | | | | | | 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.
* egl: Return the correct array size in _eglFlattenArray.Chia-I Wu2010-07-151-1/+4
| | | | | | | The function is used by _eglGetConfigs and _eglGetScreens. The array size should not be limited by the buffer size when the buffer is NULL. This fixes fdo bug #29052.
* egl: Remove unnecessary headers.Vinson Lee2010-07-062-2/+0
|
* egl: Rework driver loading.Chia-I Wu2010-07-067-211/+365
| | | | | | | | | | | | | | | 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.
* egl: Always use EGLAPIENTRY in api function prototypesnobled2010-07-031-15/+15
| | | | Fixes the build on Windows.
* egl: Update MaxSize when a dynamic array is grown.Chia-I Wu2010-06-301-0/+1
|
* egl: Make _eglUnloadDrivers no-op on Windows.Chia-I Wu2010-06-301-0/+4
| | | | | Windows unloads DLLs before atexit. Make _eglUnloadDrivers no-op on Windows for now.
* egl: Store screens in a dynamic array.Chia-I Wu2010-06-303-30/+31
|
* egl: Store configs in a dynamic array.Chia-I Wu2010-06-303-53/+26
|
* egl: Add dynamic array.Chia-I Wu2010-06-305-0/+217
| | | | Dynamic arrays will be used to store configs and screens of a display.
* egl: Remove st/egl probe code.Chia-I Wu2010-06-292-56/+0
| | | | It is no longer needed.
* egl: Do not call drv->Initialize with global mutex locked.Chia-I Wu2010-06-291-3/+9
|
* st/egl: Build a single EGL driver.Chia-I Wu2010-06-291-82/+3
| | | | | | | | | | | | This change makes st/egl build a single egl_gallium.so and multiple st_<API>.so and pipe_<HW>.so. When a display is initialized, the corresponding pipe driver will be loaded. When a context is created, the corresponding state tracker will be loaded. Unlike DRI drivers, no ABI compatibility is maintained. egl_gallium, pipe drivers and state trackers should always be distributed as a single package. As such, there is only a single src/gallium/targets/egl/ that builds everything for the package.
* st/egl: One driver per hardware.Chia-I Wu2010-06-296-45/+66
| | | | | | Merge multiple egl_<platform>_<pipe>.so into a single egl_gallium_<pipe>.so. The environment variable EGL_PLATFORM is now used to modify the return value of _eglGetNativePlatform.