Mike Blumenkrantz
8f6fca89aa
meson: delete dri3 build option
...
this existed for historical reasons, but realistically now it should
be possible to build mesa with dri3 always enabled. additionally,
this check was often used as a substitute for having drm functionality,
which is sort of similar but also not really a direct match
this simplifies a bunch of conditionals and prevents users from footgunnning
themselves into orbit
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30952 >
2024-09-04 14:48:17 +00:00
David Rosca
c447c6fe17
egl/wayland: Fix flush after blit in swap buffers multi-GPU case
...
dri2_wl_swap_buffers_with_damage is not used by swrast, so the swrast
condition there is wrong and instead it should always flush.
Fixes: fd17c018e9 ("egl/wayland: replace a couple DRI2_FLUSH checks with non-kms_swrast checks")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30964 >
2024-09-02 13:22:30 +00:00
Mike Blumenkrantz
898012ba11
egl: use more precise conditional for passing fd through to dri screen create
...
kms_swrast is included in the swrast conditional and needs a fd,
and there is a flag which indicates pure swrast which can be used to
ensure this case is detected
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30951 >
2024-08-30 18:42:27 +00:00
Mike Blumenkrantz
ecb788624b
revert part of 94e470a32d
...
accidentally added during rebase
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30949 >
2024-08-30 17:08:33 +00:00
Mike Blumenkrantz
94e470a32d
zink: update profile with missing extensions
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30944 >
2024-08-30 13:37:25 +00:00
Mike Blumenkrantz
9777f016c7
egl/x11: pretend kopper is software with LIBGL_KOPPER_DRI2
...
there's no render device fd here, so take the sw path on startup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30872 >
2024-08-27 17:41:37 +00:00
Mike Blumenkrantz
aae62e5d29
egl: unify LIBGL_KOPPER_DRI2 checks
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30872 >
2024-08-27 17:41:37 +00:00
Lepton Wu
72506ac8c7
egl/android: Fix wrong pipe format for RGB_565
...
We were actually using PIPE_FORMAT_B5G6R5_UNORM for HAL_PIXEL_FORMAT_RGB_565
since Android support was added to Mesa. This restores the original behavior.
Fixes: 273e54391a ("egl/android: Remove hard-coded color-channel data")
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30827 >
2024-08-25 21:01:15 +00:00
Mike Blumenkrantz
13066905d3
egl/android: call dri2_display_create() like every other driver
...
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30773 >
2024-08-22 14:22:41 +00:00
Mike Blumenkrantz
fceb122a2e
egl/wayland: do display gpu fd dance for non-sw zink init
...
Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647 >
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
b38480d6c7
egl: pass real value for software to dri2_setup_device()
...
this was otherwise breaking zink
Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647 >
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
7deb96a5f9
egl/wayland: split out dmabuf extension stuff for kopper
...
this allows deleting the fd check which is really what this was
intending to do (but is still broken because llvmpipe supports this)
Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647 >
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
28b291446b
egl: really fix kopper fd passing
...
for real this time.
Fixes: c8c46bf900 ("egl: fix fd passing on init with zink")
Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647 >
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
b66743984c
egl: add DRI_USE_INVALIDATE with non-sw kopper
...
Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647 >
2024-08-21 16:51:19 +00:00
Scott Moreau
7cbe8c390d
egl: hook up swap interval bits when using zink on wayland
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25358 >
2024-08-20 16:19:17 -06:00
Scott Moreau
a641ca34fa
egl: small refactor to avoid code duplication
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25358 >
2024-08-20 16:18:04 -06:00
Mike Blumenkrantz
9042e9a8c0
dri: rework drawable creation
...
this consolidates all the creation code into the dri frontend,
enabling a single caller from the loader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
af6d3fdf6e
dri: pass has_multibuffers through from the loader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
576015f735
egl: check x11 multibuffer support before screen create
...
no functional changes
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
af3df1133b
egl: initialize dri error code variables
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
694478025d
egl/glx: make detecting explicit modifier support more explicit
...
explicit modifier usage is different from general modifier capability
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11652 , https://gitlab.freedesktop.org/mesa/mesa/-/issues/11663
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30662 >
2024-08-19 15:00:51 +00:00
Mike Blumenkrantz
c20d6a9197
egl: make dmabuf/modifier display bools a bit more precise/intelligible
...
'has_modifiers' was misleading and not actually useful
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30662 >
2024-08-19 15:00:51 +00:00
Mike Blumenkrantz
c8c46bf900
egl: fix fd passing on init with zink
...
this should be passed with gbm but not for any other display type
Fixes: 5ab29555cf ("egl/x11: pass render fd to screen create for zink")
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30588 >
2024-08-12 14:58:05 +00:00
Mike Blumenkrantz
d120992e1a
egl/wayland: bail on zink init in non-sw mode if extension check fails
...
cc: mesa-stable
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30479 >
2024-08-12 13:02:20 +00:00
Rob Clark
19d44313a4
egl: Fix surfaceless + modifiers
...
Modifiers are not restricted to dri3.
Fixes: d86f39e7cf ("egl: swap DRI_IMAGE checks for dmabuf/modifier support for driver check")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30579 >
2024-08-09 16:14:43 +00:00
Mike Blumenkrantz
0b1c0f4193
egl: stop loading driver extensions
...
this is pointless now
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30524 >
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
1de7c86bc1
dri: pass through a type enum for creating screen instead of driver_extensions
...
the caller always knows what type of screen this will be, which means
it's finally possible to kill off passing a vtable here
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30524 >
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
83e53e3136
egl/dri: move some screen accessors back to dri frontend
...
this is so clunky rrrrrrrrahwefawiufhweofhaf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30524 >
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
1a579552af
egl: fix zink init
...
* close(fd) requires also resetting the fd=-1 or else boom
* checking just driver_name is broken because loader_get_driver_for_fd()
uses MESA_LOADER_DRIVER_OVERRIDE, so there's no way to differentiate
an inferred load
Fixes: b907eb4750 ("egl: don't bind zink under dri2/3")
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30556 >
2024-08-09 08:46:39 -04:00
Connor Abbott
5ab29555cf
egl/x11: pass render fd to screen create for zink
...
Fixes: f43883cf67 ("egl/gbm: rip out DRI_SWRAST")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30563 >
2024-08-08 12:55:50 +00:00
Lucas Fryzek
df96cac2cf
llvmpipe: Add android platform integration
...
Allow llvmpipe to run on Android without any drm device present.
Previously llvmpipe would only run with kms_swrast, still requiring
a drm device driver to be present for the display.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344 >
2024-08-08 09:04:47 +00:00
Lucas Fryzek
4009709bc3
egl/surfaceless: Add error checking to create image
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344 >
2024-08-08 09:04:47 +00:00
Mike Blumenkrantz
33a336309e
egl: simplify multibuffers check
...
this is all x11 now, so all the extra checks are unnecessary
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
f5a340058d
egl: move multibuffers check into platform_x11
...
there are no longer any extensions to bind, so this function has no
other purpose
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
8407e674cc
egl: delete DRI_MUTABLE_RENDER_BUFFER_DRIVER remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
79b8ea9b76
egl/android: replace DRI_MUTABLE_RENDER_BUFFER_DRIVER check with non-kms_swrast check
...
this should be roughly equivalent
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
7452a1d853
egl: delete DRI2_BLOB remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
591bf3c153
egl: inline DRI2_BLOB
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
24a1651910
egl: delete DRI2_INTEROP remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
ccd0a4c1fe
egl: always advertise MESA_gl_interop, inline calls
...
this matches GLX since the inner functions return support correctly
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
1d31a15b24
egl: delete DRI2_FENCE remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
3c692131ff
egl: inline DRI2_FENCE
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
a19839e25d
egl: don't check for create_fence_fd method when importing a fence
...
this is always supported
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
50b4be8d48
egl: simplify native fence check
...
this is the same conditional during init
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
b23acb801e
egl: delete checks for DRI2_FENCE
...
this is supported everywhere
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
c684a9b918
egl: delete DRI_TEX_BUFFER remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
f6c649a0ef
egl: inline DRI_TEX_BUFFER
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
cb018b6883
egl: delete DRI_CONFIG_QUERY remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
d723991ded
egl: inline DRI2_CONFIG_QUERY
...
this is always supported
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
197e4f2ae2
egl: delete DRI_FLUSH_CONTROL remnants
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494 >
2024-08-05 20:33:15 +00:00