aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
* Revert "egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXT"Tapani Pälli2019-11-143-70/+11
| | | | | | | | | | | 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-147-106/+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-112-0/+4
| | | | | | 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]>
* meson: move the generic symbols check arguments to a common variableEric Engestrom2019-11-051-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviwed-by: Dylan Baker <dylan@pnwbakers>
* meson: add variable to control the symbols checksEric Engestrom2019-11-051-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviwed-by: Dylan Baker <dylan@pnwbakers>
* meson: Add dep_glvnd to egl deps when building with glvndDylan Baker2019-11-051-1/+2
| | | | | | | | | | | Otherwise if glvnd is not installed systemwide, but only in a prefix, it's headers wont be found. This happens because if it's headers are in /usr/include/ then another dependence will provide the necessary -I arguments and compilation will work. Fixes: 035ec7a2bb2d5e413ac945b8f012185a0e187d5e ("meson: Add support for EGL glvnd") Acked-by: Eric Engestrom <[email protected]>
* meson: revert glvnd workaroundEric Engestrom2019-10-311-11/+2
| | | | | | | This effectively reverts MR !2112. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* egl: implement new functions from EGL_EXT_image_flush_externalMarek Olšák2019-10-257-0/+106
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-By: Tapani Pälli <[email protected]>
* egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXTMarek Olšák2019-10-253-11/+70
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-By: Tapani Pälli <[email protected]>
* egl/android: Remove our own reference to buffers.Lepton Wu2019-10-211-3/+1
| | | | | | | | | | | | | | | | | | | We currently doesn't maintain it correctly and the buffer gets leaked if surface is destroyed before calling swapping buffers. From Android frameworks/native/libs/nativewindow/include/system/window.h: The window holds a reference to the buffer between dequeueBuffer and either queueBuffer or cancelBuffer, so clients only need their own reference if they might use the buffer after queueing or canceling it. v2: Remove our own reference. Fixes: 0212db35040 ("egl/android: Cancel any outstanding ANativeBuffer in surface destructor") Reviewed-by: Chia-I Wu <[email protected]> (v1) Reviewed-By: Tapani Pälli <[email protected]> Signed-off-by: Lepton Wu <[email protected]>
* Revert "egl: Fixes transparency with EGL and X11."Hal Gentz2019-10-185-30/+17
| | | | This reverts commit 90a19074b4e1d4d8f8ababaade8170c05aeecffe.
* Revert "egl: Puts RGBA visuals in the second config selection group."Hal Gentz2019-10-181-9/+1
| | | | This reverts commit a800d16e4f1589e41e53edf8e8a771a33bb46a6a.
* Revert "egl: Configs w/o double buffering support have no `EGL_WINDOW_BIT`."Hal Gentz2019-10-1810-78/+7
| | | | This reverts commit 075a96aa926e6e89795f95a6a59693f44d9ac970.
* egl: Configs w/o double buffering support have no `EGL_WINDOW_BIT`.Hal Gentz2019-10-1110-7/+78
| | | | | | | | | | | | | | | | 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: Puts RGBA visuals in the second config selection group.Hal Gentz2019-10-111-1/+9
| | | | | | | | | | | | | | | That way applications don't get windows that are compositor alpha-blended accidentally. In the ideal world, this would be done by the xserver, as it does for GLX, however, an appropriate place could not be found, so it's being placed here instead. 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-115-17/+30
| | | | | | | | | | | | | 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]>
* meson: rename `glvnd_missing_pc_files` to `not glvnd_has_headers_and_pc_files`Eric Engestrom2019-10-101-2/+2
| | | | | | | | This reflects better what is provided by glvnd or not. Fixes: 93df862b6affb6b8507e ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* egl: Include stddef.h in generated sourceDanilo Spinella2019-10-091-0/+1
| | | | | | | Required for NULL macro used throughout the generated file. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[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
* surfaceless: Support EGL_WL_bind_wayland_displayAdam Jackson2019-10-041-0/+4
| | | | | | | Feature parity with the drm, x11, and wayland platforms. Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1870 Tested-by: Pekka Paalanen <[email protected]>
* egl: Remove the 565 pbuffer-only EGL config under X11.Andres Gomez2019-10-031-93/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The CTS finally has agreed to drop the requirement for a 565-no-depth-no-stencil config for ES 3.0. Hence we can now remove the code to satisfy this requirement using a pbuffer-only visual with whatever other buffers the driver happens to have given us. This reverts commit 82607f8a900796871470ac4f1a04e154392e4898, commit 6ad31c4ff33d92f6359b196a94ace99682272111 and commit dacb11a585face5ca179c34cfc588a71a425c1e0. v2: - Reference the VK-GL-CTS issue (Eric E.). v3: - Don't revert fc21394bc4d ("egl: Quiet warning about front buffer rendering for pixmaps/pbuffers") (Kenneth). References: VK-GL-CTS issue 1601. Cc: [email protected] Signed-off-by: Andres Gomez <[email protected]> Acked-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* egl/dri2: Don't dlclose() the driver on dri2_load_driver_common failureAdam Jackson2019-10-031-3/+2
| | | | | | | | | | | | | | | | ... because it's wrong to do so. The error path out of dri2_initialize_drm ends with dri2_display_destroy, which calls functions in the vtable we're trying to set up, so if we dlclose the driver then those function pointers will point off into space and things crash. Noticed this because after !1923 eglinfo would crash when setting up the GBM platform. This was something of a cascade failure, because my kernel is too old for DRM_IOCTL_I915_GETPARAM to work without DRM_AUTH, so i965 wouldn't load. platform_drm.c then got very confused when it tries to load swrast as a dri2 driver. Reviewed-by: Eric Anholt <[email protected]>
* egl/gbm: Fix config validationRobin Murphy2019-10-011-2/+4
| | | | | | | | | | | | | In converting to shift/size-based validation, we lost a condition from the ARGB/XRGB equivalence check, which left it working one way round but not the other, and broke applications like glmark2-es2-drm on some platforms. Restore the equivalent check that *both* configs actually have an alpha channel before considering a mismatch. Fixes: 7b4ed2b513ef ("egl: Convert configs to use shifts and sizes instead of masks") Signed-off-by: Robin Murphy <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: Fix implicit declaration of ffsKevin Strasser2019-09-301-0/+1
| | | | | | | | | | Found when building for Android in C99 mode. Include bitscan.h to ensure ffs is available. Fixes: 7b4ed2b5 ("egl: Convert configs to use shifts and sizes instead of masks") Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: fix logic for generating .pc files with old glvndDylan Baker2019-09-251-14/+16
| | | | | | | | | | | | | | We want to generate PC files for non-glvnd builds and for builds with old glvnd, but the current logic doesn't do that, it builds them unconditionally, and for GLES it builds the shared libraries, which is also not what we want. This does not generate .pc files for gles1 or gles2. Which it we weren't doing before either, making this not a regression but a return to status-quo.o Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1838 Fixes: 93df862b6affb6b8507e40601212a58012bfa873 ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility") Reviewed-by: Matt Turner <[email protected]>
* meson: re-add incorrect pkg-config files with GLVND for backward compatibilityEric Engestrom2019-09-251-10/+17
| | | | | | | | | | | | This is a bit counter-intuitive, but the issue is that GLVND is broken in versions <= 1.1.1, so we need to keep wrongly providing these files to cover up their mistake, otherwise the rest of the world ends up broken. Suggested-by: Dylan Baker <[email protected]> Cc: [email protected] Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* egl/surfaceless: Add FP16 format supportAdam Jackson2019-09-201-1/+16
| | | | Reviewed-by: Kevin Strasser <[email protected]>
* egl/wayland: Implement getCapability for the dri2 and image loadersAdam Jackson2019-09-201-2/+15
| | | | Reviewed-by: Kevin Strasser <[email protected]>
* egl/wayland: Add FP16 format supportAdam Jackson2019-09-203-1/+24
| | | | Reviewed-by: Kevin Strasser <[email protected]>
* egl/wayland: Reindent the format tableAdam Jackson2019-09-201-35/+35
| | | | | | No idea how these ended up with 3-then-2-space indents. Reviewed-by: Kevin Strasser <[email protected]>
* 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/android: Fix build since the DRI fourcc removal.Eric Anholt2019-09-121-0/+1
| | | | | | | Fixes: 272f9cfe6a19 ("dri: Use DRM_FORMAT_* instead of defining our own copy.") Reviewed-by: John Stultz <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* egl/android: Only keep BGRA EGL configs as fallbackLepton Wu2019-09-121-0/+11
| | | | | | | | | | | Stock Android code actually doesn't support BGRA format EGL configs. It's hard coded to use RGBA_8888 as window format for BGRA EGL configs here: https://android.googlesource.com/platform/frameworks/native/+/1eb32e2/opengl/libs/EGL/eglApi.cpp#608 So just remove it from EGL configs if RGBA is supported. Signed-off-by: Lepton Wu <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl/android: Enable HAL_PIXEL_FORMAT_RGBA_1010102 formatrenchenglei2019-09-121-0/+3
| | | | | | | | | | | | The patch adds support for HAL_PIXEL_FORMAT_RGBA_1010102 on Android platform. Fixes android.media.cts.DecoderTest#testVp9HdrStaticMetadata which failed in egl due to "Unsupported native buffer format 0x2b" on Android. Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Chenglei Ren <[email protected]>
* dri: Use DRM_FORMAT_* instead of defining our own copy.Eric Anholt2019-09-111-15/+15
| | | | | | | | | | | | We have only two defines that aren't from DRM_FORMAT_*: SARGB and SABGR. Keep only those as __DRI_IMAGE_FOURCC and garbage collect the rest. While this header is also used from the X server, the X server doesn't use any __DRI_IMAGE enums. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* Fix missing dri2_load_driver on platform_drmJean Hertel2019-09-111-0/+15
| | | | | | Signed-off-by: Jean Hertel <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* egl/dri2: Refuse to add EGLConfigs with no supported surface typesAdam Jackson2019-09-111-13/+16
| | | | | | | | For example, the surfaceless platform only supports pbuffers. If the driver supports MSAA, we would still create a config, but it would have no supported surface types. That's meaningless, so don't do it. Reviewed-by: Eric Engestrom <[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: Enable 10bpc EGLConfigs for platform_{device,surfaceless}Adam Jackson2019-09-042-0/+4
| | | | | | It's somewhat annoying that these are so similar for so little benefit. Reviewed-by: Eric Engestrom <[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/android: Enable HAL_PIXEL_FORMAT_RGBA_FP16 formatNataraj Deshpande2019-08-291-0/+5
| | | | | | | | | | | | The patch adds support for 64 bit HAL_PIXEL_FORMAT_RGBA_FP16 for android platform. Fixes android.graphics.cts.BitmapColorSpaceTest#test16bitHardware which failed in egl due to "Unsupported native buffer format 0x16" on chromebooks. Signed-off-by: Nataraj Deshpande <[email protected]> Reviewed-by: Tapani Pälli <[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]>
* gbm: Add buffer handling and visuals for fp16 formatsKevin Strasser2019-08-211-0/+2
| | | | | | | | | | Define and set a new loader cap DRI_LOADER_CAP_FP16, indicating that gbm can handle fp16 formats. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Handle dri configs with floating point pixel dataKevin Strasser2019-08-213-2/+29
| | | | | | | | | | | | In the case that __DRI_ATTRIB_FLOAT_BIT is set in the dri config, set EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT in the egl config. Add a field to the platform driver visual to indicate if it has components that are in floating point form. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Convert configs to use shifts and sizes instead of masksKevin Strasser2019-08-218-86/+178
| | | | | | | | | | | | Change dri2_add_config to take arrays of shifts and sizes, and compare with those set in the dri config. Convert all platform driver masks to shifts and sizes. In order to handle older drivers, where shift attributes aren't available, we fall back to the mask attributes and compute the shifts with ffs. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Emil Velikov <[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]>