From 9708a9eaead17de1823d3f6add4a52303af8b047 Mon Sep 17 00:00:00 2001 From: Thomas Crider Date: Sat, 6 Jan 2024 21:13:33 -0500 Subject: [PATCH] patches: rebase staging --- patches/gstreamer/5509.patch | 147 ------- patches/gstreamer/5511.patch | 371 ------------------ patches/protonprep-valve-staging.sh | 20 +- patches/wine-hotfixes/pending/210.patch | 38 ++ ...k-drive_c-as-case-insensitive-when-c.patch | 92 +++++ .../staging/ntdll-ext4-case-folder/definition | 1 + ...a-default-vulkan-driver-if-one-not-f.patch | 2 +- 7 files changed, 144 insertions(+), 527 deletions(-) delete mode 100644 patches/gstreamer/5509.patch delete mode 100644 patches/gstreamer/5511.patch create mode 100644 patches/wine-hotfixes/pending/210.patch create mode 100644 patches/wine-hotfixes/staging/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch create mode 100644 patches/wine-hotfixes/staging/ntdll-ext4-case-folder/definition diff --git a/patches/gstreamer/5509.patch b/patches/gstreamer/5509.patch deleted file mode 100644 index 6d3c40503..000000000 --- a/patches/gstreamer/5509.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 414512d922d11a1955a1b84755723647b91960c3 Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Thu, 19 Oct 2023 00:55:58 +0200 -Subject: [PATCH] glcontext/egl: Prefer GLES2 over GL/GL3 by default - -From a multimedia perspective GLES >= 2 has the big advantage of -supporting external textures (`OES_EGL_image_external` / -`OES_EGL_image_external_essl3`), allowing various YUV formats to be -imported directly by drivers. - -It appears unlikely by now that the extension will ever be ported to -GL with Vulkan becoming more popular, leaving GL without an "official" -way to import YUV formats. - -Further more, for Gst internal purposes it's likely that GLES2 works -equally well if not better on most drivers these days, especially on -embedded devices. - -Thus switch the default for EGL context creation to GLES2. This won't -affect apps that create their own context, but `gst-launch-1.0` etc., -which are often used for testing so people don't have to pass -`GST_GL_API=gles2`. - -Part-of: ---- - .../gst-libs/gst/gl/egl/gstglcontext_egl.c | 98 +++++++++---------- - 1 file changed, 49 insertions(+), 49 deletions(-) - -diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c -index c01bd46cfa7..a919014cca8 100644 ---- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c -+++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c -@@ -925,7 +925,55 @@ gst_gl_context_egl_create_context (GstGLContext * context, - - gst_gl_context_egl_dump_all_configs (egl); - -- if (gl_api & (GST_GL_API_OPENGL | GST_GL_API_OPENGL3)) { -+ if (gl_api & GST_GL_API_GLES2) { -+ gint i; -+ -+ try_gles2: -+ if (!eglBindAPI (EGL_OPENGL_ES_API)) { -+ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED, -+ "Failed to bind OpenGL|ES API: %s", -+ gst_egl_get_error_string (eglGetError ())); -+ goto failure; -+ } -+ -+ GST_INFO ("Bound OpenGL|ES"); -+ -+ for (i = 0; i < G_N_ELEMENTS (gles2_versions); i++) { -+ gint profileMask = 0; -+ gint contextFlags = 0; -+ guint maj = gles2_versions[i].major; -+ guint min = gles2_versions[i].minor; -+ -+ if (!gst_gl_context_egl_choose_config (egl, GST_GL_API_GLES2, maj, error)) { -+ GST_DEBUG_OBJECT (context, "Failed to choose a GLES%d config: %s", -+ maj, error && *error ? (*error)->message : "Unknown"); -+ g_clear_error (error); -+ continue; -+ } -+#if defined(EGL_KHR_create_context) -+ /* try a debug context */ -+ contextFlags |= EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR; -+ -+ egl->egl_context = -+ _create_context_with_flags (egl, (EGLContext) external_gl_context, -+ GST_GL_API_GLES2, maj, min, contextFlags, profileMask); -+ -+ if (egl->egl_context) -+ break; -+ -+ /* try without a debug context */ -+ contextFlags &= ~EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR; -+#endif -+ -+ egl->egl_context = -+ _create_context_with_flags (egl, (EGLContext) external_gl_context, -+ GST_GL_API_GLES2, maj, min, contextFlags, profileMask); -+ -+ if (egl->egl_context) -+ break; -+ } -+ egl->gl_api = GST_GL_API_GLES2; -+ } else if (gl_api & (GST_GL_API_OPENGL | GST_GL_API_OPENGL3)) { - GstGLAPI chosen_gl_api = 0; - gint i; - -@@ -1015,54 +1063,6 @@ gst_gl_context_egl_create_context (GstGLContext * context, - } - - egl->gl_api = chosen_gl_api; -- } else if (gl_api & GST_GL_API_GLES2) { -- gint i; -- -- try_gles2: -- if (!eglBindAPI (EGL_OPENGL_ES_API)) { -- g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED, -- "Failed to bind OpenGL|ES API: %s", -- gst_egl_get_error_string (eglGetError ())); -- goto failure; -- } -- -- GST_INFO ("Bound OpenGL|ES"); -- -- for (i = 0; i < G_N_ELEMENTS (gles2_versions); i++) { -- gint profileMask = 0; -- gint contextFlags = 0; -- guint maj = gles2_versions[i].major; -- guint min = gles2_versions[i].minor; -- -- if (!gst_gl_context_egl_choose_config (egl, GST_GL_API_GLES2, maj, error)) { -- GST_DEBUG_OBJECT (context, "Failed to choose a GLES%d config: %s", -- maj, error && *error ? (*error)->message : "Unknown"); -- g_clear_error (error); -- continue; -- } --#if defined(EGL_KHR_create_context) -- /* try a debug context */ -- contextFlags |= EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR; -- -- egl->egl_context = -- _create_context_with_flags (egl, (EGLContext) external_gl_context, -- GST_GL_API_GLES2, maj, min, contextFlags, profileMask); -- -- if (egl->egl_context) -- break; -- -- /* try without a debug context */ -- contextFlags &= ~EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR; --#endif -- -- egl->egl_context = -- _create_context_with_flags (egl, (EGLContext) external_gl_context, -- GST_GL_API_GLES2, maj, min, contextFlags, profileMask); -- -- if (egl->egl_context) -- break; -- } -- egl->gl_api = GST_GL_API_GLES2; - } - - if (egl->egl_context != EGL_NO_CONTEXT) { --- -GitLab - diff --git a/patches/gstreamer/5511.patch b/patches/gstreamer/5511.patch deleted file mode 100644 index 72c11e70e..000000000 --- a/patches/gstreamer/5511.patch +++ /dev/null @@ -1,371 +0,0 @@ -From 34694bbfcf8d532eff3f168fba867d7f0668447f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lo=C3=AFc=20Le=20Page?= -Date: Thu, 19 Oct 2023 18:45:29 +0200 -Subject: [PATCH 1/2] gl: fix "winrt" string comparison in - gst_gl_display_type_from_environment - -Part-of: ---- - subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c -index 2a041b7b0a6..304c0e09a0f 100644 ---- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c -+++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c -@@ -308,7 +308,7 @@ gst_gl_display_type_from_environment (void) - return GST_GL_DISPLAY_TYPE_EAGL; - } else if (g_strstr_len (env, 7, "android")) { - return GST_GL_DISPLAY_TYPE_EGL; -- } else if (g_strstr_len (env, 4, "winrt")) { -+ } else if (g_strstr_len (env, 5, "winrt")) { - return GST_GL_DISPLAY_TYPE_EGL; - } else { - return GST_GL_DISPLAY_TYPE_NONE; --- -GitLab - - -From e1ca5754089df4673703be346d741c05018d2c24 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lo=C3=AFc=20Le=20Page?= -Date: Thu, 19 Oct 2023 14:10:16 +0200 -Subject: [PATCH 2/2] gl: add support for surfaceless display in GstGL - -Use of the EGL_MESA_platform_surfaceless EGL extension to create an EGL -display that is not depending on any kind of windowing system. - -Part-of: ---- - girs/GstGL-1.0.gir | 4 +- - .../gst-libs/gst/gl/egl/gstgldisplay_egl.c | 54 ++++++++++++++++--- - .../gst-libs/gst/gl/egl/gstgldisplay_egl.h | 3 ++ - .../gst-libs/gst/gl/gstgldisplay.c | 9 +++- - .../gst-libs/gst/gl/gstgldisplay.h | 9 ++++ - .../gst-libs/gst/gl/gstglwindow.c | 3 ++ - .../gst-libs/gst/gl/meson.build | 33 ++++++++++-- - .../gst-plugins-base/meson_options.txt | 2 +- - subprojects/gstreamer/docs/gst/running.md | 2 +- - subprojects/gstreamer/docs/index.md | 2 +- - 10 files changed, 107 insertions(+), 14 deletions(-) - -diff --git a/girs/GstGL-1.0.gir b/girs/GstGL-1.0.gir -index 2626db44792..87d7645c001 100644 ---- a/girs/GstGL-1.0.gir -+++ b/girs/GstGL-1.0.gir -@@ -3016,7 +3016,7 @@ a #GstGLDisplay. - There are a number of environment variables that influence the choice of - platform and window system specific functionality. - - GST_GL_WINDOW influences the window system to use. Common values are -- 'x11', 'wayland', 'win32' or 'cocoa'. -+ 'x11', 'wayland', 'surfaceless', 'win32' or 'cocoa'. - - GST_GL_PLATFORM influences the OpenGL platform to use. Common values are - 'egl', 'glx', 'wgl' or 'cgl'. - - GST_GL_API influences the OpenGL API requested by the OpenGL platform. -@@ -3453,6 +3453,8 @@ display's object lock held. - - - -+ -+ - - any display type - -diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstgldisplay_egl.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstgldisplay_egl.c -index e617b8adb88..902416c19f6 100644 ---- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstgldisplay_egl.c -+++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstgldisplay_egl.c -@@ -25,8 +25,8 @@ - * @see_also: #GstGLDisplay - * - * #GstGLDisplayEGL represents a connection to an EGL `EGLDisplay` handle created -- * internally (gst_gl_display_egl_new()) or wrapped by the application -- * (gst_gl_display_egl_new_with_egl_display()) -+ * internally (gst_gl_display_egl_new() or gst_gl_display_egl_new_surfaceless()) -+ * or wrapped by the application (gst_gl_display_egl_new_with_egl_display()) - */ - - #ifdef HAVE_CONFIG_H -@@ -122,8 +122,8 @@ gst_gl_display_egl_finalize (GObject * object) - * @display: pointer to a display (or 0) - * - * Attempts to create a new `EGLDisplay` from @display. If @type is -- * %GST_GL_DISPLAY_TYPE_ANY, then @display must be 0. @type must not be -- * %GST_GL_DISPLAY_TYPE_NONE. -+ * %GST_GL_DISPLAY_TYPE_ANY or %GST_GL_DISPLAY_TYPE_EGL_SURFACELESS, then -+ * @display must be 0. @type must not be %GST_GL_DISPLAY_TYPE_NONE. - * - * Returns: (nullable): A `EGLDisplay` or `EGL_NO_DISPLAY` - * -@@ -137,8 +137,11 @@ gst_gl_display_egl_get_from_native (GstGLDisplayType type, guintptr display) - _gst_eglGetPlatformDisplay_type _gst_eglGetPlatformDisplay = NULL; - - g_return_val_if_fail (type != GST_GL_DISPLAY_TYPE_NONE, EGL_NO_DISPLAY); -- g_return_val_if_fail ((type != GST_GL_DISPLAY_TYPE_ANY && display != 0) -- || (type == GST_GL_DISPLAY_TYPE_ANY && display == 0), EGL_NO_DISPLAY); -+ g_return_val_if_fail ((type != GST_GL_DISPLAY_TYPE_ANY && -+ type != GST_GL_DISPLAY_TYPE_EGL_SURFACELESS && display != 0) -+ || ((type == GST_GL_DISPLAY_TYPE_ANY || -+ type == GST_GL_DISPLAY_TYPE_EGL_SURFACELESS) && display == 0), -+ EGL_NO_DISPLAY); - - init_debug (); - -@@ -233,6 +236,11 @@ gst_gl_display_egl_get_from_native (GstGLDisplayType type, guintptr display) - NULL); - } - /* android only has one winsys/display connection */ -+ if (ret == EGL_NO_DISPLAY && (type & GST_GL_DISPLAY_TYPE_EGL_SURFACELESS) && -+ gst_gl_check_extension ("EGL_MESA_platform_surfaceless", egl_exts)) { -+ ret = _gst_eglGetPlatformDisplay (EGL_PLATFORM_SURFACELESS_MESA, -+ (gpointer) display, NULL); -+ } - - if (ret != EGL_NO_DISPLAY) - return ret; -@@ -272,6 +280,40 @@ gst_gl_display_egl_new (void) - return ret; - } - -+/** -+ * gst_gl_display_egl_new_surfaceless: -+ * -+ * Create a new surfaceless #GstGLDisplayEGL using the Mesa3D -+ * EGL_PLATFORM_SURFACELESS_MESA extension. -+ * -+ * Returns: (transfer full) (nullable): a new #GstGLDisplayEGL or %NULL -+ * -+ * Since: 1.24 -+ */ -+GstGLDisplayEGL * -+gst_gl_display_egl_new_surfaceless (void) -+{ -+ GstGLDisplayEGL *ret; -+ gpointer display; -+ -+ init_debug (); -+ -+ display = -+ gst_gl_display_egl_get_from_native (GST_GL_DISPLAY_TYPE_EGL_SURFACELESS, -+ 0); -+ -+ if (!display) { -+ GST_INFO ("Failed to create a surfaceless EGL display"); -+ return NULL; -+ } -+ -+ ret = g_object_new (GST_TYPE_GL_DISPLAY_EGL, NULL); -+ gst_object_ref_sink (ret); -+ ret->display = display; -+ -+ return ret; -+} -+ - /** - * gst_gl_display_egl_new_with_display: - * @display: an existing and connected EGLDisplay -diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstgldisplay_egl.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstgldisplay_egl.h -index 23dc01a9ddb..f7e27de5f9d 100644 ---- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstgldisplay_egl.h -+++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstgldisplay_egl.h -@@ -66,6 +66,9 @@ struct _GstGLDisplayEGLClass - GST_GL_API - GstGLDisplayEGL *gst_gl_display_egl_new (void); - -+GST_GL_API -+GstGLDisplayEGL *gst_gl_display_egl_new_surfaceless (void); -+ - GST_GL_API - GstGLDisplayEGL *gst_gl_display_egl_new_with_egl_display (gpointer display); - -diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c -index 304c0e09a0f..d51863c4bed 100644 ---- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c -+++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c -@@ -34,7 +34,7 @@ - * There are a number of environment variables that influence the choice of - * platform and window system specific functionality. - * - GST_GL_WINDOW influences the window system to use. Common values are -- * 'x11', 'wayland', 'win32' or 'cocoa'. -+ * 'x11', 'wayland', 'surfaceless', 'win32' or 'cocoa'. - * - GST_GL_PLATFORM influences the OpenGL platform to use. Common values are - * 'egl', 'glx', 'wgl' or 'cgl'. - * - GST_GL_API influences the OpenGL API requested by the OpenGL platform. -@@ -310,6 +310,8 @@ gst_gl_display_type_from_environment (void) - return GST_GL_DISPLAY_TYPE_EGL; - } else if (g_strstr_len (env, 5, "winrt")) { - return GST_GL_DISPLAY_TYPE_EGL; -+ } else if (g_strstr_len (env, 11, "surfaceless")) { -+ return GST_GL_DISPLAY_TYPE_EGL_SURFACELESS; - } else { - return GST_GL_DISPLAY_TYPE_NONE; - } -@@ -393,9 +395,14 @@ gst_gl_display_new_with_type (GstGLDisplayType type) - if (!display && (type & GST_GL_DISPLAY_TYPE_EGL)) { - display = GST_GL_DISPLAY (gst_gl_display_egl_new ()); - } -+ -+ if (!display && (type & GST_GL_DISPLAY_TYPE_EGL_SURFACELESS)) { -+ display = GST_GL_DISPLAY (gst_gl_display_egl_new_surfaceless ()); -+ } - #endif - custom_new_types |= GST_GL_DISPLAY_TYPE_EGL_DEVICE; - custom_new_types |= GST_GL_DISPLAY_TYPE_EGL; -+ custom_new_types |= GST_GL_DISPLAY_TYPE_EGL_SURFACELESS; - custom_new_types |= GST_GL_DISPLAY_TYPE_DISPMANX; - custom_new_types |= GST_GL_DISPLAY_TYPE_WINRT; - custom_new_types |= GST_GL_DISPLAY_TYPE_ANDROID; -diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.h -index 0fbefde07f6..2448218d63b 100644 ---- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.h -+++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.h -@@ -80,6 +80,14 @@ GType gst_gl_display_get_type (void); - * - * Since: 1.20 - */ -+/** -+ * GST_GL_DISPLAY_TYPE_EGL_SURFACELESS: -+ * -+ * Mesa3D surfaceless display using the EGL_PLATFORM_SURFACELESS_MESA -+ * extension. -+ * -+ * Since: 1.24 -+ */ - typedef enum - { - GST_GL_DISPLAY_TYPE_NONE = 0, -@@ -95,6 +103,7 @@ typedef enum - GST_GL_DISPLAY_TYPE_EAGL = (1 << 9), - GST_GL_DISPLAY_TYPE_WINRT = (1 << 10), - GST_GL_DISPLAY_TYPE_ANDROID = (1 << 11), -+ GST_GL_DISPLAY_TYPE_EGL_SURFACELESS = (1 << 12), - - GST_GL_DISPLAY_TYPE_ANY = G_MAXUINT32 - } GstGLDisplayType; -diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglwindow.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglwindow.c -index 91c1ae05131..a6f95b17af6 100644 ---- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglwindow.c -+++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglwindow.c -@@ -334,6 +334,9 @@ gst_gl_window_new (GstGLDisplay * display) - if (!window && (!user_choice || g_strstr_len (user_choice, 5, "winrt"))) - window = GST_GL_WINDOW (gst_gl_window_winrt_egl_new (display)); - #endif -+ if (!window && (!user_choice -+ || g_strstr_len (user_choice, 11, "surfaceless"))) -+ window = GST_GL_WINDOW (gst_gl_dummy_window_new ()); - - if (!window) { - /* subclass returned a NULL window */ -diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build -index ebdab9089ab..b97ec0c049b 100644 ---- a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build -+++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build -@@ -253,6 +253,7 @@ if gl_winsys.contains('auto') - need_win_winrt = 'auto' - need_win_cocoa = 'auto' - need_win_egl = 'auto' -+ need_win_surfaceless = 'auto' - need_win_eagl = 'auto' - need_win_dispmanx = 'auto' - need_win_viv_fb = 'auto' -@@ -265,6 +266,7 @@ else - need_win_winrt = 'no' - need_win_cocoa = 'no' - need_win_egl = 'no' -+ need_win_surfaceless = 'no' - need_win_eagl = 'no' - need_win_dispmanx = 'no' - need_win_viv_fb = 'no' -@@ -283,6 +285,8 @@ else - need_win_cocoa = 'yes' - elif winsys == 'egl' - need_win_egl = 'yes' -+ elif winsys == 'surfaceless' -+ need_win_surfaceless = 'yes' - elif winsys == 'eagl' - need_win_eagl = 'yes' - elif winsys == 'dispmanx' -@@ -578,16 +582,39 @@ if need_platform_egl != 'no' - endif - - # winsys_egl checks --if need_win_egl == 'yes' -+if need_win_egl != 'no' - if need_platform_egl == 'no' -- error('Impossible situation requested: Cannot use Winsys egl without EGL support') -+ if need_win_egl == 'yes' -+ error ('Impossible situation requested: Cannot use Winsys egl without EGL support') -+ endif - elif not egl_dep.found() -- error ('Could not find EGL libraries for Winsys egl') -+ if need_win_egl == 'yes' -+ error ('Could not find EGL libraries for Winsys egl') -+ else -+ message ('Could not find EGL libraries for Winsys egl') -+ endif - else - enabled_gl_winsys += 'egl' - endif - endif - -+# winsys_surfaceless checks -+if need_win_surfaceless != 'no' -+ if need_platform_egl == 'no' -+ if need_win_surfaceless == 'yes' -+ error ('Impossible situation requested: Cannot use Winsys surfaceless without EGL support') -+ endif -+ elif not egl_dep.found() -+ if need_win_surfaceless == 'yes' -+ error ('Could not find EGL libraries for Winsys surfaceless') -+ else -+ message ('Could not find EGL libraries for Winsys surfaceless') -+ endif -+ else -+ enabled_gl_winsys += 'surfaceless' -+ endif -+endif -+ - # wayland checks - wayland_client_dep = unneeded_dep - wayland_cursor_dep = unneeded_dep -diff --git a/subprojects/gst-plugins-base/meson_options.txt b/subprojects/gst-plugins-base/meson_options.txt -index 2fb13cfafb2..45d0fed0aaa 100644 ---- a/subprojects/gst-plugins-base/meson_options.txt -+++ b/subprojects/gst-plugins-base/meson_options.txt -@@ -12,7 +12,7 @@ option('gl_platform', type : 'array', - choices : ['glx', 'egl', 'cgl', 'wgl', 'eagl', 'auto'], value : ['auto'], - description : 'A comma separated list of opengl platforms to enable building against') - option('gl_winsys', type : 'array', -- choices : ['x11', 'wayland', 'win32', 'winrt', 'cocoa', 'dispmanx', 'egl', 'viv-fb', 'gbm', 'android', 'auto'], value : ['auto'], -+ choices : ['x11', 'wayland', 'win32', 'winrt', 'cocoa', 'dispmanx', 'egl', 'surfaceless', 'viv-fb', 'gbm', 'android', 'auto'], value : ['auto'], - description : 'A comma separated list of opengl windows systems to enable building against. Supported values are x11, wayland, win32, winrt, cocoa, dispmanx, egl, viv-fb, gbm, and android') - option('egl_module_name', type : 'string', value : '', - description : 'The file to pass to g_module_open to open the libEGL library (default: libEGL)') -diff --git a/subprojects/gstreamer/docs/gst/running.md b/subprojects/gstreamer/docs/gst/running.md -index 08eb86cc1d3..436a7900d33 100644 ---- a/subprojects/gstreamer/docs/gst/running.md -+++ b/subprojects/gstreamer/docs/gst/running.md -@@ -315,7 +315,7 @@ the encoding does not look like UTF-8. - **`GST_GL_WINDOW`.** - - Influences the window system to use by the GStreamer OpenGL library. --Common values are 'x11', 'wayland', 'win32' or 'cocoa'. -+Common values are 'x11', 'wayland', 'surfaceless', 'win32' or 'cocoa'. - - **`GST_GL_PLATFORM`.** - -diff --git a/subprojects/gstreamer/docs/index.md b/subprojects/gstreamer/docs/index.md -index 14b04503508..72bf530bebb 100644 ---- a/subprojects/gstreamer/docs/index.md -+++ b/subprojects/gstreamer/docs/index.md -@@ -325,7 +325,7 @@ the encoding does not look like UTF-8. - **GST_GL_WINDOW.** - - Influences the window system to use by the GStreamer OpenGL library. --Common values are 'x11', 'wayland', 'win32' or 'cocoa'. -+Common values are 'x11', 'wayland', 'surfaceless', 'win32' or 'cocoa'. - - **GST_GL_PLATFORM.** - --- -GitLab - diff --git a/patches/protonprep-valve-staging.sh b/patches/protonprep-valve-staging.sh index 28fb63c1e..2125711e0 100755 --- a/patches/protonprep-valve-staging.sh +++ b/patches/protonprep-valve-staging.sh @@ -12,13 +12,6 @@ git clean -xdf cd .. - cd gstreamer - git reset --hard HEAD - git clean -xdf - patch -Np1 < ../patches/gstreamer/5509.patch - patch -Np1 < ../patches/gstreamer/5511.patch - cd .. - cd wineopenxr git checkout openxr.c echo "WINEOPENXR: -GAME FIXES- BeamNG.Drive VR Fix" @@ -120,7 +113,9 @@ -W wined3d-SWVP-shaders \ -W wined3d-Indexed_Vertex_Blending \ -W shell32-registry-lookup-app \ - -W winepulse-PulseAudio_Support + -W winepulse-PulseAudio_Support \ + -W d3dx9_36-D3DXStubs \ + -W ntdll-ext4-case-folder # NOTE: Some patches are applied manually because they -do- apply, just not cleanly, ie with patch fuzz. # A detailed list of why the above patches are disabled is listed below: @@ -198,6 +193,8 @@ # ** winex11-XEMBED - applied manually # ** shell32-registry-lookup-app - applied manually # ** winepulse-PulseAudio_Support - applied manually + # d3dx9_36-D3DXStubs - already applied + # ** ntdll-ext4-case-folder - applied manually # # Paul Gofman — Yesterday at 3:49 PM # that’s only for desktop integration, spamming native menu’s with wine apps which won’t probably start from there anyway @@ -319,6 +316,9 @@ # winepulse-PulseAudio_Support patch -Np1 < ../patches/wine-hotfixes/staging/winepulse-PulseAudio_Support/0001-winepulse.drv-Use-a-separate-mainloop-and-ctx-for-pu.patch + # ntdll-ext4-case-folder + patch -Np1 < ../patches/wine-hotfixes/staging/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch + ### END WINE STAGING APPLY SECTION ### ### (2-3) GAME PATCH SECTION ### @@ -376,6 +376,10 @@ echo "WINE: -PENDING- Fix empty 'OpenGL Renderer' windows created by gstreamer" patch -Np1 < ../patches/wine-hotfixes/pending/0001-ntdll-Force-gstreamer-to-only-use-x11-for-GST_GL_WIN.patch + # https://github.com/ValveSoftware/wine/pull/210 + echo "WINE: -PENDING- Fix transparent gl windows being created by gstreamer" + patch -Np1 < ../patches/wine-hotfixes/pending/210.patch + ### END WINE PENDING UPSTREAM SECTION ### diff --git a/patches/wine-hotfixes/pending/210.patch b/patches/wine-hotfixes/pending/210.patch new file mode 100644 index 000000000..448c55c16 --- /dev/null +++ b/patches/wine-hotfixes/pending/210.patch @@ -0,0 +1,38 @@ +From bdb1a3307977dd67aa871c9f1a7bea24a0b21099 Mon Sep 17 00:00:00 2001 +From: Thomas Crider +Date: Thu, 14 Dec 2023 17:09:37 -0500 +Subject: [PATCH 1/1] ntdll: Force gstreamer to only use x11 for + GST_GL_WINDOW + +Proton only uses x11, however users using it outside of the +steamos/steamdeck environment (such as on wayland desktops +or with other applications such as Lutris, Heroic, Bottles, +and so on) tend to hit a bug with gstreamer: + +"GStreamer with OpenGL creates an empty "OpenGL Renderer" window on Wayland" +https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2997 + +There is an upstream merged MR in gstreamer that adds +support for EGL_MESA_platform_surfaceless: + +https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5511 + +However this is not necessary if we instead force GST_GL_WINDOW=x11 even +on wayland, it avoids the empty "OpenGL Renderer" windows on wayland. +--- + dlls/winegstreamer/unixlib.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dlls/winegstreamer/unixlib.c b/dlls/winegstreamer/unixlib.c +index 346adec81f8..708197f76fe 100644 +--- a/dlls/winegstreamer/unixlib.c ++++ b/dlls/winegstreamer/unixlib.c +@@ -353,6 +353,8 @@ NTSTATUS wg_init_gstreamer(void *arg) + GST_INFO("GStreamer library version %s; wine built with %d.%d.%d.", + gst_version_string(), GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO); + ++ setenv("GST_GL_WINDOW", "x11", 0); ++ + if (!(gl_display = gst_gl_display_new())) + GST_ERROR("Failed to create OpenGL display"); + else diff --git a/patches/wine-hotfixes/staging/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch b/patches/wine-hotfixes/staging/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch new file mode 100644 index 000000000..99c539688 --- /dev/null +++ b/patches/wine-hotfixes/staging/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch @@ -0,0 +1,92 @@ +From 1fbb361023f9474a3522762aae32ad64d056e37e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= +Date: Fri, 24 May 2019 15:09:35 +0300 +Subject: [PATCH] ntdll/server: Mark drive_c as case-insensitive when created +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47099 +Signed-off-by: Gabriel Ivăncescu +--- + dlls/ntdll/unix/server.c | 43 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c +index ab9d99c4f47..f40897757e3 100644 +--- a/dlls/ntdll/unix/server.c ++++ b/dlls/ntdll/unix/server.c +@@ -49,6 +49,10 @@ + #ifdef HAVE_SYS_UN_H + #include + #endif ++#include ++#ifdef HAVE_LINUX_IOCTL_H ++#include ++#endif + #ifdef HAVE_SYS_PRCTL_H + # include + #endif +@@ -83,6 +87,22 @@ + + WINE_DEFAULT_DEBUG_CHANNEL(server); + ++/* just in case... */ ++#undef EXT2_IOC_GETFLAGS ++#undef EXT2_IOC_SETFLAGS ++#undef EXT4_CASEFOLD_FL ++ ++#ifdef __linux__ ++ ++/* Define the ext2 ioctls for handling extra attributes */ ++#define EXT2_IOC_GETFLAGS _IOR('f', 1, long) ++#define EXT2_IOC_SETFLAGS _IOW('f', 2, long) ++ ++/* Case-insensitivity attribute */ ++#define EXT4_CASEFOLD_FL 0x40000000 ++ ++#endif ++ + #ifndef MSG_CMSG_CLOEXEC + #define MSG_CMSG_CLOEXEC 0 + #endif +@@ -1137,6 +1157,28 @@ static const char *init_server_dir( dev_t dev, ino_t ino ) + } + + ++/*********************************************************************** ++ * set_case_insensitive ++ * ++ * Make the supplied directory case insensitive, if available. ++ */ ++static void set_case_insensitive(const char *dir) ++{ ++#if defined(EXT2_IOC_GETFLAGS) && defined(EXT2_IOC_SETFLAGS) && defined(EXT4_CASEFOLD_FL) ++ int flags, fd; ++ ++ if ((fd = open(dir, O_RDONLY | O_NONBLOCK | O_LARGEFILE)) == -1) ++ return; ++ if (ioctl(fd, EXT2_IOC_GETFLAGS, &flags) != -1 && !(flags & EXT4_CASEFOLD_FL)) ++ { ++ flags |= EXT4_CASEFOLD_FL; ++ ioctl(fd, EXT2_IOC_SETFLAGS, &flags); ++ } ++ close(fd); ++#endif ++} ++ ++ + /*********************************************************************** + * setup_config_dir + * +@@ -1173,6 +1215,7 @@ static int setup_config_dir(void) + if (!mkdir( "dosdevices", 0777 )) + { + mkdir( "drive_c", 0777 ); ++ set_case_insensitive( "drive_c" ); + symlink( "../drive_c", "dosdevices/c:" ); + symlink( "/", "dosdevices/z:" ); + } +-- +2.34.1 + diff --git a/patches/wine-hotfixes/staging/ntdll-ext4-case-folder/definition b/patches/wine-hotfixes/staging/ntdll-ext4-case-folder/definition new file mode 100644 index 000000000..39ed88639 --- /dev/null +++ b/patches/wine-hotfixes/staging/ntdll-ext4-case-folder/definition @@ -0,0 +1 @@ +Fixes: [47099] Support for EXT4 case folding per directory. diff --git a/patches/wine-hotfixes/staging/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch b/patches/wine-hotfixes/staging/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch index 8d0149a96..6942a0a59 100644 --- a/patches/wine-hotfixes/staging/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch +++ b/patches/wine-hotfixes/staging/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch @@ -72,7 +72,7 @@ index f4fe202dfaf..1768444b2e5 100644 -{ -} - --void resize_vk_surfaces(HWND hwnd, Window active, int mask, XWindowChanges changes) +-void resize_vk_surfaces(HWND hwnd, Window active, int mask, XWindowChanges *changes) -{ -} -