Commit Graph

2207 Commits

Author SHA1 Message Date
Adam Jackson 5e407ec524 egl: Fix a bunch of maybe-uninitialized warnings
Fedora's gcc 12 is apparently not smart enough to deduce that these are
always initialized, so set some clear default values.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18713>
2022-09-22 20:13:57 +00:00
Mike Blumenkrantz 2569215f43 egl/glx: add fallback for zink loading
if the driver attemping to load is not zink and not software, then
attempt a zink fallback on failure

this conservatively handles the case of "only zink is built", though it
is going to be noticeably slower at startup than loading zink directly

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16168>
2022-09-21 20:29:06 +00:00
Pierre-Eric Pelloux-Prayer 58f90fd03f egl/wayland: fix glthread crashes
glthread unmarshalling thread cannot run concurrently with code that alloc
the back bo or the code that perform the swaps.
Ensure this by running dri2_flush_drawable_for_swapbuffers early.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18223>
2022-09-21 14:54:50 +00:00
Michael Skorokhodov 5e76850cff egl: Return EGL_BAD_MATCH for invalid share_list
From the eglspec.1.5: "An EGL_BAD_MATCH is generated if [...]
share context was created on a different display than
the one referenced by config."

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6414
Signed-off-by: Mykhailo Skorokhodov<mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16368>
2022-09-20 15:47:22 +00:00
Vinson Lee 093b19b09a egl/dri2: Fix missing return with dri2_egl_error_unlock.
Fix defect reported by Coverity Scan.

Double unlock (LOCK)
double_unlock: dri2_egl_error_unlock unlocks dri2_dpy->lock while it is unlocked.

Fixes: f1efe037df ("egl/dri2: Add display lock")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18655>
2022-09-19 16:24:08 +00:00
Adam Jackson a6483f0434 egl/dri2: Fix some thinkos in old context release
All of the objects here should be relative to the old context / display
/ surfaces. Calling disp->unbindContext() on a context that disp did not
create is likely to go poorly.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18586>
2022-09-16 14:23:47 +00:00
Adam Jackson 7a744aa318 egl/dri2: Fix a typo in a comment
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18586>
2022-09-16 14:23:47 +00:00
Adam Jackson 6c6a37ef94 egl/dri2: Respect the arguments to dri2_set_blob_cache_funcs
This is no functional change, since this is effectively what the caller
is passing in, but it's still a layering violation.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18586>
2022-09-16 14:23:47 +00:00
Rob Clark bbef3cb9d3 egl: Relax locking
Now that we have the rwlock TerminateLock protecting us against
eglTerminate() yanking the rug from under us, drop the BDL across
calls to driver (or at least the main ones that can potentially
block).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7039
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18050>
2022-09-07 21:21:38 -07:00
Rob Clark 5d99e8cc03 egl: Introduce rwlock to protect eglTerminate()
eglTerminate() must be serialized against all other EGL calls.  But in
most cases, other EGL calls do not need to be serialized against each
other.  Which fits rather well with a rwlock.

One would be tempted to simply replace the existing BDL with a rwlock,
but several portability and debuggability limitations of the rwlock
implementation prevent that, as described in the TerminateLock comment
block.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18050>
2022-09-07 21:21:34 -07:00
Rob Clark 7ba2784b0a egl: Make RefCount atomic
Once we relax the locking, we will be doing _eglPutFoo() outside of the
big display lock.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18050>
2022-09-07 21:21:29 -07:00
Rob Clark f1efe037df egl/dri2: Add display lock
In preperation of relaxing eglapi to not hold a lock across driver
calls, but instead only for protecting it's own state, add our own
lock to protect code paths that need locking or have not been audited
yet.  The blocking calls (ClientWaitSyncKHR) or critical path and/or
blocking (MakeCurrent, SwapBuffers*) are lockless, as they have already
been audited for thread safety.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18050>
2022-09-07 21:21:25 -07:00
Rob Clark fc5281286d egl/dri2: Make ref_count atomic
In particular, MakeCurrent can be called on multiple threads in
parallel.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18050>
2022-09-07 21:21:21 -07:00
Rob Clark a2d6dee4f0 egl/wgl: Make ref_count atomic
Looks like wgl doesn't have much display state to protect.  But it's
ref_count should be atomic before we start removing locking from eglapi
to protect against MakeCurrent being called in parallel on multiple
threads.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18050>
2022-09-07 21:21:16 -07:00
Adam Jackson f41a6504a1 egl/kopper: Don't add EGL_SWAP_BEHAVIOR_PRESERVED_BIT configs
It's strictly inferior to EGL_EXT_buffer_age so apps shouldn't bother to
begin with, and we don't communicate the surface preservation state to
the backend so we don't handle it correctly in any case.

Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18214>
2022-09-06 17:46:50 +00:00
Adam Jackson 168fdb5a91 egl: Move an error check earlier in EGL_BUFFER_AGE_EXT query
I can't think of any good reason to call down to the driver and _then_
check whether your calling context was already bad.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18214>
2022-09-06 17:46:49 +00:00
Eric Engestrom 33426a328b wayland: avoid writing interface names as free-form strings
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18335>
2022-08-31 11:17:51 +01:00
Adam Jackson dae8f76245 egl: Remove some can't-happen supported API checks
The only other thing this could be is OpenVG, which we never create.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18128>
2022-08-29 20:31:14 +00:00
Chia-I Wu 9518af12aa util/perf: support and prefer perfetto for cpu trace
To keep tracing working, this also adds util_perfetto_init to
eglGet*Display.

Acked-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260>
2022-08-26 21:47:44 +00:00
Chia-I Wu 022cd156d4 util/perf: add cpu_trace.h
Move MESA_TRACE_* to the new file.

Acked-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260>
2022-08-26 21:47:44 +00:00
Eric Engestrom c66622de3a meson: replace manual compiler flags with meson arguments
These would only have worked in GCC and Clang, which so far wasn't an
issue, but let's clean it up anyway.

Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18190>
2022-08-24 22:13:19 +00:00
Rob Clark aaeb5bea29 egl/dri2: Error path cleanups
Simplify things for the next patch.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18111>
2022-08-17 21:17:17 +00:00
Rob Clark a4cd1bc9b7 egl/dri2: Indenting fix
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18111>
2022-08-17 21:17:17 +00:00
Rob Clark 7fcdc07aaa egl: Add some locking asserts
Make it obvious if we screw up while reworking locking.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18111>
2022-08-17 21:17:17 +00:00
Rob Clark a020e9e70a egl: Convert to simple_mtx_t
Mostly because simple_mtx_assert_locked() will come in handy during
locking re-work.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18111>
2022-08-17 21:17:17 +00:00
Rob Clark 8c34ea69d8 egl: Remove redundant fxn param
*Technically* we should be unlocking with the 'disp' and not the 'dpy'
(even though they are the same thing).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18111>
2022-08-17 21:17:17 +00:00
Rob Clark 7d55729ae5 egl: Drop unused _EGL_FUNC_START() arg
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18111>
2022-08-17 21:17:17 +00:00
Rob Clark c11583b164 egl: Drop _eglSetFuncName() return
It always returned EGL_TRUE

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18111>
2022-08-17 21:17:17 +00:00
Rob Clark b69cbc0caa egl: atrace support
Perfetto is showing mutex contention on disp->Mutex when multiple
threads are making egl calls on their own current context.  This
makes it easier to see what is contending with what.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18111>
2022-08-17 21:17:17 +00:00
Jesse Natalie 17eda68df3 egl/wgl: Fix some awkward sizeof formatting
Fixes: 3415bf02 ("egl: Add a basic Windows driver")
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie efd2ae6c0c egl/wgl: Delete unused variables/code
Fixes: 3415bf02 ("egl: Add a basic Windows driver")
Suggested-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie 35e9c7e082 wgl: Use pfi instead of iPixelFormat more often
Also, support config-less contexts, and surface-less contexts.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie aeb3147a96 egl/wgl: Support sync objects
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie e08d2dde22 egl/wgl: Support EGL_MESA_query_driver
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie 52e663959e egl/wgl: Hook up image validate/get in smapi
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie c512b68816 egl/wgl: Use a per-display st_manager
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie 250bdcbfbe wgl: Pass smapi explicitly to framebuffer creation
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie f5b1824ce3 wgl: Pass smapi explicitly to context creation
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie d57a4abcf8 egl,wgl: Support eglCreateImageKHR
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:43 +00:00
Jesse Natalie 76756ea4c6 egl/wgl: Support eglWaitNative
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:42 +00:00
Jesse Natalie 0e8271b27a egl/wgl: Support eglWaitClient
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:42 +00:00
Jesse Natalie 1d9e0a4ab0 egl/wgl: Support eglSwapInterval
Note, eglSwapInterval spec says "The default swap interval is 1."

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:42 +00:00
Jesse Natalie 0f533b3640 egl/wgl: Implement bind/release texture buffer
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:42 +00:00
Jesse Natalie 1d0757e2e3 egl/wgl: Set YInvert attribute to always true
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:42 +00:00
Jesse Natalie 87931cdb1f egl/wgl: Implement PBuffer surfaces
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:42 +00:00
Jesse Natalie 11ee16493d egl/wgl: Implement QuerySurface
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:42 +00:00
Jesse Natalie 8cab2ae240 egl/wgl: Don't require a native display to support window surfaces
Found a Windows EGL/GLES app that inits EGL without a native display,
and then creates a window surface from that EGL display:
https://github.com/danginsburg/opengles3-book/

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
2022-08-10 21:00:42 +00:00
Yonggang Luo 4752655649 egl/x11: implement ANGLE_sync_control_rate
Implement EGL_ANGLE_sync_control_rate for running Chromium Linux on Wayland with EGL backend.

Chromium works with this patch using(with videos playing smoothly):
/usr/bin/google-chrome-stable --use-gl=egl --enable-features=VaapiVideoDecoder --ignore-gpu-blocklist

Closes #2930

Signed-off-by: KJ Liew <liewkj@yahoo.com>
Signed-off-by: Térence Clastres <t.clastres@gmail.com>
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>
2022-08-09 21:02:50 +00:00
Yonggang Luo 94cfa50dc6 egl/x11: Split declaration of dri2_format_for_depth into header platform_x11.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>
2022-08-09 21:02:50 +00:00
Yonggang Luo eebea558b7 egl: wire up ANGLE_sync_control_rate
Add eglGetMscRateANGLE prototype into generate file

Signed-off-by: KJ Liew <liewkj@yahoo.com>
Signed-off-by: Térence Clastres <t.clastres@gmail.com>
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>
2022-08-09 21:02:50 +00:00