aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main
Commit message (Collapse)AuthorAgeFilesLines
* Revert "egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXT"Tapani Pälli2019-11-142-26/+0
| | | | | | | | | | | This reverts commit 34b1aa957a3f44ea9587ec43311e8434d3782cc1. This series caused unexpected flickering artifacts with Iris driver on Chrome OS and EGL_EXT_image_flush_external spec has not been published yet. Acked-by: Eric Engestrom <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]>
* Revert "egl: implement new functions from EGL_EXT_image_flush_external"Tapani Pälli2019-11-144-58/+0
| | | | | | | | | | | This reverts commit c1c574fdf18f2aeb1c03f9670bf00e1dcd22d99d. This series caused unexpected flickering artifacts with Iris driver on Chrome OS and EGL_EXT_image_flush_external spec has not been published yet. Acked-by: Eric Engestrom <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]>
* egl: move #include of local headers out of Khronos headersEric Engestrom2019-11-111-0/+2
| | | | | | Cc: [email protected] Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: fix _EGL_NATIVE_PLATFORM fallbackEric Engestrom2019-11-111-9/+0
| | | | | | | | | When the X11 or Haiku platforms were compiled in, they would bypass the `_EGL_NATIVE_PLATFORM` fallback by always returning themselves instead. Cc: [email protected] Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: Mention if swrast is being forcedChris Wilson2019-11-111-0/+2
| | | | | | | | | | | | | | The system can be disabling HW acceleration unbeknown to the user, leading to a long debug session trying to work out which component is failing. A quick mention that it is the environment override would be very useful. v2: Use more generic "CPU renderer" and so try to avoid jargon. Reviewed-By: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Martin Peres <[email protected]>
* egl: implement new functions from EGL_EXT_image_flush_externalMarek Olšák2019-10-254-0/+58
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-By: Tapani Pälli <[email protected]>
* egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXTMarek Olšák2019-10-252-0/+26
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-By: Tapani Pälli <[email protected]>
* Revert "egl: Fixes transparency with EGL and X11."Hal Gentz2019-10-183-13/+1
| | | | This reverts commit 90a19074b4e1d4d8f8ababaade8170c05aeecffe.
* Revert "egl: Configs w/o double buffering support have no `EGL_WINDOW_BIT`."Hal Gentz2019-10-182-13/+0
| | | | This reverts commit 075a96aa926e6e89795f95a6a59693f44d9ac970.
* egl: Configs w/o double buffering support have no `EGL_WINDOW_BIT`.Hal Gentz2019-10-112-0/+13
| | | | | | | | | | | | | | | | When users pass a config to `eglCreateWindowSurface` it requests double buffering, but if the config doesn't have the appropriate `__DRIconfig`, `eglCreateWindowSurface` fails with a `EGL_BAD_MATCH`. Given that such behaviour is completely unacceptable, we drop the `EGL_WINDOW_BIT` if we don't have at least one `__DRIconfig` supporting double buffering, otherwise dropping the `EGL_PIXMAP_BIT`. Fixes: 049f343e8ac "egl: Allow 24-bit visuals for 32-bit RGBA8888 configs" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67676 Cc: [email protected] Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Hal Gentz <[email protected]>
* egl: Fixes transparency with EGL and X11.Hal Gentz2019-10-113-1/+13
| | | | | | | | | | | | | This commit does this by allowing both RGB and RGBA visuals to match with EGL configs. We also expose the `EGL_MESA_config_select_group` egl extension, which is similar to GLX's visual select group extension, to allow the RGBA visuals to get less priority. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67676 Fixes: 049f343e8ac "egl: Allow 24-bit visuals for 32-bit RGBA8888 configs" Cc: [email protected] Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Hal Gentz <[email protected]>
* egl: Make native display detection work more than onceAdam Jackson2019-10-091-22/+12
| | | | | | | | | | | | eglGetDisplay is awful because you have to inspect the pointer you're given and guess what type of native display it corresponds to. We make it worse by caching the type of the first such display we detect, so if the second call to eglGetDisplay is to a different display type, kaboom. Fortunately this is a problem that can be solved with the delete key. Reviewed-by: Eric Engestrom <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/156
* egl: check for NULL value like eglGetSyncAttribKHR doesTapani Pälli2019-09-191-0/+4
| | | | | | | | | | | | | Commit d1e1563bb63 added a NULL check for eglGetSyncAttribKHR but eglGetSyncAttrib does not do this. Patch adds same check to happen with eglGetSyncAttrib. Fixes crashes in (when exposing EGL 1.5): dEQP-EGL.functional.fence_sync.invalid.get_invalid_value Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Cc: [email protected]
* egl: Add GL_MESA_EGL_sync supportHeinrich Fink2019-09-081-4/+7
| | | | | | | | This commit follow OES_EGL_sync to universially enable use of EGL sync objects with desktop OpenGL contexts. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: fix deadlock in malloc error pathEric Engestrom2019-09-041-1/+3
| | | | | | Fixes: cb0980e69aa921af7086 ("egl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku}") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: warn user if they set an invalid EGL_PLATFORMEric Engestrom2019-09-031-0/+3
| | | | | | | | | Technically, the user might have set EGL_DISPLAY instead of EGL_PLATFORM, but since the former is deprecated let's just mention the latter in the warning message. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* egl: fix platform selectionLionel Landwerlin2019-09-021-2/+7
| | | | | | | | | | | | Add missing "device" platform v2: Add the missing platform (Eric) Signed-off-by: Lionel Landwerlin <[email protected]> Reported-by: Jean Hertel <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111529 Fixes: d6edccee8d ("egl: add EGL_platform_device support") Reviewed-by: Eric Engestrom <[email protected]>
* egl: reset blob cache set/get functions on terminateTapani Pälli2019-08-231-0/+4
| | | | | | | | | Fixes errors seen with eglSetBlobCacheFuncsANDROID on Android when running dEQP that terminates and reinitializes a display. Fixes: 6f5b57093b3 "egl: add support for EGL_ANDROID_blob_cache" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* win32: unify strcasecmp definitionsErik Faye-Lund2019-08-151-0/+1
| | | | | | | | | There was two incompatible definitions of strcasecmp, which lead to a compiler warning. Let's clean this up by only leaving one of them, and using that one all the time. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Rename GLX_USE_TLS to USE_ELF_TLS.Bas Nieuwenhuizen2019-08-031-3/+3
| | | | | | | These days it is not GLX only and it does not work with all TLS implementations. Reviewed-by: Eric Engestrom <[email protected]>
* tree-wide: replace MAYBE_UNUSED with ASSERTEDEric Engestrom2019-07-311-1/+1
| | | | | | Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* egl: simplify loopEric Engestrom2019-07-011-3/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Sagar Ghuge<[email protected]>
* egl: Enable eglGetPlatformDisplay on Android Platformrenchenglei2019-06-293-0/+27
| | | | | | This helps to add eglGetPlatformDisplay support on Android Platform. Reviewed-by: Eric Engestrom <[email protected]>
* egl: replace dead vfunc with an errorEric Engestrom2019-06-252-14/+2
| | | | | | | | | | st/egl used to support eglCreatePbufferFromClientBuffer, but now that it's gone, any call to it would segfault. Let's return a nice error instead. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: delete unused vfuncsEric Engestrom2019-06-252-46/+7
| | | | | | | | | | | Nobody ever uses these, so let's just hard code them instead. If an EGL driver ever comes around that needs them they're trivial to re-add. Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: drop empty eglfallbacks.cEric Engestrom2019-06-253-51/+0
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: move eglGetSyncAttrib() fallback to eglapi.cEric Engestrom2019-06-252-2/+5
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: move eglSwapInterval() fallback to eglapi.cEric Engestrom2019-06-252-5/+8
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: move eglSurfaceAttrib() fallback to eglapi.cEric Engestrom2019-06-252-3/+5
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: move eglQuerySurface() fallback to eglapi.cEric Engestrom2019-06-252-2/+5
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: move eglQueryContext() fallback to eglapi.cEric Engestrom2019-06-252-3/+5
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: move eglGetConfigAttrib() fallback to eglapi.cEric Engestrom2019-06-252-3/+5
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: move eglChooseConfig() fallback to eglapi.cEric Engestrom2019-06-252-3/+6
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: move eglGetConfigs() fallback to eglapi.cEric Engestrom2019-06-252-2/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* Revert "egl: drop empty eglfallbacks.c" and "egl: move fallback calls to ↵Eric Engestrom2019-06-224-38/+73
| | | | | | | | | | | | | | | | eglapi.c" This reverts commits cc4b68a80193e2a132cb62309292984a9428f2bb and b27fb3eacab906ec06cd61b7d01e3425c3b3cbfc. These caused a bunch of EGLSync tests to crash when they were previously failing. I have a hunch the tests are doing something wrong, like using extensions without checking for they support, but until the issue is investigated I'm just reverting these commits. Signed-off-by: Eric Engestrom <[email protected]>
* egl: drop empty eglfallbacks.cEric Engestrom2019-06-223-51/+0
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: move fallback calls to eglapi.cEric Engestrom2019-06-222-22/+38
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: drop `_eglReturnFalse()` fallbacksEric Engestrom2019-06-221-24/+0
| | | | | | | | | v2: drop them altogether, they should never get called in the first place (Emil) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: remove unnecessary eglGetProcAddress() fallbackEric Engestrom2019-06-222-2/+1
| | | | | | | | | No need to add a function that returns `false` only to be cast into a pointer, we can just use the existing `return NULL` :) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: remove NULL assignments after calloc()Eric Engestrom2019-06-221-21/+0
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: move bad_param check further upEric Engestrom2019-06-222-6/+8
| | | | | | | | | This way other functions added in these entrypoints don't need to check anything. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: add missing #includeEric Engestrom2019-06-191-0/+1
| | | | | | | | close() is in <unistd.h> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Don't add hardware device if there is no render node v2.Mathias Fröhlich2019-06-191-2/+2
| | | | | | | | | | | | | | | Do not offer a hardware drm backed egl device if no render node is available. The current implementation will fail on this egl device. On top it issues a warning that is actually missleading. There are finally more error paths that can fail on the way to a hardware backed egl device. Fixing all of them would kind of require opening the drm device and see if there is a usable driver associated with the device. The taken approach avoids a full probe and fixes at least this kind of problem on kvm virtualization hosts I observe here. Fixes: dbb4457d985 ("egl: add EGL_EXT_device_drm support") Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* egl: compare the whole list of attributesEric Engestrom2019-06-111-1/+1
| | | | | | | | | `memcmp()` compares a given number of bytes, but `EGLAttrib` is larger than a byte. Fixes: 8e991ce5397598ceb422 "egl: handle the full attrib list in display::options" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: add EGL_platform_device supportEmil Velikov2019-06-056-7/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new 'platform' is added by default with no guards. It is effectively a copy of the surfaceless one, with updated function names and brand new probe function. Due to the reuse, some of the ifdef HAVE_SURFACELESS_PLATFORM guards have been dropped. A worthy mention are the changes in _egFindDisplay, since the original and dup'd fd are required, we make use of the plat_opt argument. Note that no hacks for eglGetDisplay are added - the API works only with the eglGetPlatformDisplay* API. v2: - s/_eglCompareDeviceDisplay/_eglSameDeviceDisplay/ (Eric) - let ^^ return bool (Eric) - fixup meson build, move files() further up (Eric) - copy from plat. surfaceless w/o the visual cleanups - close and free when destroying the dpy - sprinkle a few _eglDeviceSupports - split fd handling into separate function - use directly the render node if no FD is given (Mathias) v3: - s/dpy/disp/g - drop swap_buffers* callbacks - drop loader_set_logger() - drop local define - re-introduce _eglGetDRMDeviceRenderNode() - EGL_WARN on ForceSoftware with HW device - continue using the HW device - bail out for "EGL_MESA_device_software" until it's fixed - wire-up the Android build v4: - use new style _eglFindDisplay() - split hw vs sw code paths - don't close the internal fd (already handled in FiniDisplay()) - make swrast work (bit hacky bit will do for now) - Android for real, drop autotools - Correct HW + LIBGL_ALWAYS_SOFTWARE check - use the dri2_create_drawable() helper v5: - enhance comment around fd checks (Mathias) - rebase for dri2_init_surface() changes Cc: Mathias Fröhlich <[email protected]> Acked-by: Marek Olšák <[email protected]> (v4) Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl: keep the software device at the end of the listEmil Velikov2019-06-051-1/+13
| | | | | | | | | | | | | By default, the user is likely to pick the first device so it should not be the least performant (aka software) one. v2: Drop odd comment (Marek) Suggested-by: Marek Olšák <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> (v1) Reviewed-by: Marek Olšák <[email protected]> (v1) Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl: fold X11 attrib handling like other platformsEmil Velikov2019-06-051-34/+11
| | | | | | | | | | Since we no longer need special handling for X11, refactor the code to follow the style used by all other platforms. Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl: remove Options::Platform handlingAdam Jackson2019-06-052-10/+4
| | | | | | | | | | | | The full set of attributes is already handled with previous patches. Thus all this is not dead code. v2 (Emil) - split from a larger patch. Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl: handle the full attrib list in display::optionsAdam Jackson2019-06-053-11/+55
| | | | | | | | | | | | | | | | | | | Earlier spec is vague, although EGL 1.5 makes it clear: Multiple calls made to eglGetPlatformDisplay with the same parameters will return the same EGLDisplay handle. With this commit we store and compare the full attrib list. v2 (Emil): - Split into separate patches - Use EGLBoolean over int masked as such - Don't return free'd pointed on calloc failure Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl: flesh out a _eglNumAttribs() helperEmil Velikov2019-06-052-9/+16
| | | | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>