summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglconfig.c
Commit message (Collapse)AuthorAgeFilesLines
* egl: turn a couple asserts static (compile-time)Eric Engestrom2016-08-241-3/+4
| | | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: Add EGL_RECORDABLE_ANDROID attributeRob Herring2016-04-011-0/+5
| | | | | | | | | | 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>
* egl: Add EGL_FRAMEBUFFER_TARGET_ANDROID attributeRob Herring2016-04-011-1/+6
| | | | | | | | | 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>
* egl: support EGL_LARGEST_PBUFFER in eglCreatePbufferSurface(...)Daniel Czarnowski2016-03-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Patch provides a default for a set pbuffer surface size when EGL_LARGEST_PBUFFER is used by the client. MIN2 macro is moved to egldefines so that it can be shared. Fixes following Piglit test: egl-create-largest-pbuffer-surface From EGL 1.5 spec: "Use EGL_LARGEST_PBUFFER to get the largest available pbuffer when the allocation of the pbuffer would otherwise fail." Currently there exists no API to query largest available pixmap size using xlib or xcb so right now this seems most straightforward way to ensure that we fulfill above API and also we don't attempt to allocate 'too big' pixmap which might succeed on server side but not work in practice when driver starts to use it as a texture. v2: add more explanation about the change (Emil) Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: implement EGL_KHR_gl_colorspace (v2)Marek Olšák2015-07-221-1/+2
| | | | | | v2: add missing "break" Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl: Remove skeleton implementation of EGL_MESA_screen_surfaceAdam Jackson2015-05-111-4/+0
| | | | | | | | 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>
* egl/main: no longer export internal functionEmil Velikov2015-03-051-1/+1
| | | | | | | | | | | | 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-2/+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>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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: EGL_MATCH_NATIVE_NATIVE_PIXMAP cannot be EGL_DONT_CAREChia-I Wu2011-07-291-2/+3
|
* egl: add copyright noticesChia-I Wu2011-07-021-0/+30
| | | | | The list of copyright holders could be incomplete. Please update directly or notify me if your name is missing.
* egl: fix a compiler warningChia-I Wu2011-07-011-0/+1
|
* egl: fix EGL_MATCH_NATIVE_PIXMAPChia-I Wu2011-06-251-2/+10
| | | | | EGL_MATCH_NATIVE_PIXMAP is valid for eglChooseConfig, but invalid for eglGetConfigAttrib.
* egl: make implementing eglChooseConfig easierChia-I Wu2011-06-251-22/+50
| | | | | Add a new helper function, _eglFilterConfigArray, for drivers and hide _eglSortConfigs.
* egl: _eglFilterArray should not allocate.Chia-I Wu2010-12-061-1/+12
| | | | | Otherwise, when it is called from within a driver, the caller cannot free the returned data (on Windows).
* egl: Minor changes to the _EGLConfig interface.Chia-I Wu2010-10-231-12/+22
| | | | | Mainly to rename _eglAddConfig to _eglLinkConfig, along with a few clean ups.
* egl: Access config attributes directly.Chia-I Wu2010-10-141-131/+63
| | | | Replace SET_CONFIG_ATTRIB/GET_CONFIG_ATTRIB by direct dereferences.
* egl: Use attribute names as the _EGLConfig member names.Chia-I Wu2010-10-141-23/+10
| | | | | This makes _EGLConfig more accessible and scales better when new attributes are added.
* egl: Fix context API check and be verbose.Chia-I Wu2010-08-201-2/+5
| | | | | | | 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 checks for EGL_MESA_screen_surface.Chia-I Wu2010-07-311-0/+2
| | | | | This allows Mesa EGL to be compiled with eglext.h that does not define EGL_MESA_screen_surface.
* egl: Store configs in a dynamic array.Chia-I Wu2010-06-301-43/+23
|
* egl: Implement EGL_NOK_texture_from_pixmapKristian Høgsberg2010-05-141-1/+8
| | | | | | | This extension allows a color buffer to be used for both rendering and texturing. EGL allows the use of color buffers of pbuffer drawables for texturing, this extension extends this to allow the use of color buffers of pixmaps too.
* egl: Only allow valid config attributes in _eglParseConfigAttribList()Kristian Høgsberg2010-05-141-28/+24
| | | | Passing 0x3030, 0 in the chooser list didn't get caught.
* egl: Allow a prioritized list of default driversKristian Høgsberg2010-05-131-1/+0
| | | | | | | | | | | | | | 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.
* egl: Remove unused _EGL_SKIP_HANDLE_CHECK.Chia-I Wu2010-02-231-6/+0
| | | | | | It was added to skip checking EGLDisplay, EGLSurface, and etc. It is never defined and the spec does not allow the checks to be skipped. Remove it for good.
* egl: Silence warnings when compiled with -pedantic.Chia-I Wu2010-02-191-1/+1
| | | | Just follow gcc's advices here.
* egl: Add debug messages to config validation and matching.Chia-I Wu2010-02-051-2/+23
| | | | It might be desirable find out which attribute went wrong.
* egl: Surface type validaction should depend on extensions supported.Chia-I Wu2010-01-311-1/+2
| | | | | EGL_SCREEN_BIT_MESA is a valid bit only when EGL_MESA_screen_surface is supported.
* egl: Initialize display configs with the display.Chia-I Wu2010-01-311-2/+4
| | | | This changes _eglInitConfig to take the display as its argument.
* egl: Clean up header inclusions.Chia-I Wu2010-01-301-2/+1
| | | | Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
* egl: Remove unnecessary headers.Vinson Lee2010-01-281-1/+0
|
* egl: Update headers.Chia-I Wu2010-01-251-2/+3
| | | | | | Update to the current versions found at http://www.khronos.org/registry/egl/. There is one modification in khrplatform.h for GCC visibility.
* egl: EGL_SCREEN_BIT_MESA is a valid bit.Chia-I Wu2010-01-121-0/+1
| | | | | | Update _eglValidateConfig so that it passes the test. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: Fix eglCheckConfigHandle.Chia-I Wu2009-10-151-5/+4
| | | | | | A stupid bug by me made the check void. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: Rework config lookup.Chia-I Wu2009-09-291-47/+45
| | | | | | | Make it similiar to how contexts and surfaces are looked up. It should be slightly faster, and work better with multiple displays. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: Rework configuration management.Chia-I Wu2009-09-291-198/+640
| | | | | | | | This mainly implements the algorithms for configuration selection and sorting, described in the spec. User errors should also be correctly detected and reported. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: Introduce config keys.Chia-I Wu2009-09-291-20/+6
| | | | | | | | | | Config keys are almost config attributes. A valid config attribute is a valid config key, but a valid config key may not be a valid config attribute. This commit does not distinguish the differences. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: Overhaul driver API.Chia-I Wu2009-08-181-14/+4
| | | | | | | | | | | | 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>
* egl: Silence warnings on x86-64.Chia-Wu2009-07-311-1/+1
| | | | | | | Casting an unsigned int to or from a pointer directly gives warnings on x86-64. Add wrappers to silence the warnings. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: if a surface type isn't defined let's default to EGL_WINDOW_BITAlan Hourihane2009-02-191-0/+3
|
* egl: fix default value of EGL_SURFACE_TYPE, added some sanity check assertionsBrian Paul2008-06-281-3/+9
|
* egl: These changes allow an eglBindAPI(EGL_OPENGL_ES_API) to succeed, and to ↵Robert Ellison2008-06-271-1/+1
| | | | | | | | | | | | | | work correctly with GLES1 and GLES2. - egl_xdri.c just sets the EGL_OPENGL_ES_BIT as well as the EGL_OPENGL_BIT in ClientAPIsMask - eglconfig.c allows the renderable type to include EGL_OPENGL_ES2_BIT as well as EGL_OPENGL_ES_BIT. - egl_xlib.c sets the EGL_NATIVE_RENDERABLE attribute to EGL_FALSE for all softpipe configurations. (Otherwise, an eglChooseConfig() that looks for particular values of EGL_NATIVE_RENDERABLE will fail.)
* egl: added null ptr checkBrian Paul2008-06-201-2/+4
|
* egl: in _eglAddConfig() just save a pointer to the config; don't copy the configBrian Paul2008-06-041-12/+13
| | | | This allows subclassing by drivers.
* Move some config-related utility functions into new eglconfigutil.c file.Brian Paul2008-05-271-252/+1
|
* minor overhaul/re-org of driver selection/loading codeBrian Paul2008-05-271-3/+1
|
* added _eglGet*Handle() functionsBrian Paul2008-05-271-0/+12
| | | | | | 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.
* assorted changes to compile with new EGL 1.4 headers (untested)Brian Paul2008-05-271-2/+6
|
* some initial EGL 1.2 workBrian Paul2006-01-301-3/+33
|