You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 38e95ed2227dd3f0fc3d1394c884265d43e3b283
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 95a95d09125707b24f8728c545c7f5b706bafe1c Mon Sep 17 00:00:00 2001
|
||||
From a667953fb14e6061418e42e77a2bf494121cc2b1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 22 Feb 2015 01:25:20 +0100
|
||||
Subject: [PATCH] dxva2: Initial implementation of MPEG2 decoder using vaapi
|
||||
@@ -22,19 +22,19 @@ Subject: [PATCH] dxva2: Initial implementation of MPEG2 decoder using vaapi
|
||||
create mode 100644 dlls/dxva2/vaapi.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 39cef46e7..bb89c7ee0 100644
|
||||
index 3766908bd62..13584352f3e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -111,6 +111,8 @@ AC_ARG_WITH(xslt, AS_HELP_STRING([--without-xslt],[do not use XSLT]))
|
||||
@@ -112,6 +112,8 @@ AC_ARG_WITH(xshm, AS_HELP_STRING([--without-xshm],[do not use XShm (shared
|
||||
AC_ARG_WITH(xslt, AS_HELP_STRING([--without-xslt],[do not use XSLT]))
|
||||
AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree video mode extension]),
|
||||
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; ac_cv_header_X11_extensions_xf86vmproto_h=no; fi])
|
||||
AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],[do not use Zlib (data compression)]))
|
||||
+AC_ARG_WITH(va, AS_HELP_STRING([--without-va],[do not use VA (GPU video acceleration)]),
|
||||
+ [if test "x$withval" = "xno"; then ac_cv_header_va_va_x11_h=no; fi])
|
||||
|
||||
AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR]))
|
||||
AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build]))
|
||||
@@ -1296,6 +1298,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
|
||||
@@ -1319,6 +1321,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
|
||||
WINE_WARNING_WITH(opengl,[test -n "$opengl_msg"],[$opengl_msg
|
||||
OpenGL and Direct3D won't be supported.])
|
||||
|
||||
@@ -56,7 +56,7 @@ index 39cef46e7..bb89c7ee0 100644
|
||||
else
|
||||
X_CFLAGS=""
|
||||
diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in
|
||||
index e4c90b523..b42cfae52 100644
|
||||
index e4c90b5231e..b42cfae525e 100644
|
||||
--- a/dlls/dxva2/Makefile.in
|
||||
+++ b/dlls/dxva2/Makefile.in
|
||||
@@ -1,10 +1,16 @@
|
||||
@@ -81,7 +81,7 @@ index e4c90b523..b42cfae52 100644
|
||||
+ videoservices.c
|
||||
diff --git a/dlls/dxva2/backend.idl b/dlls/dxva2/backend.idl
|
||||
new file mode 100644
|
||||
index 000000000..8d488351f
|
||||
index 00000000000..8d488351ff2
|
||||
--- /dev/null
|
||||
+++ b/dlls/dxva2/backend.idl
|
||||
@@ -0,0 +1,96 @@
|
||||
@@ -182,7 +182,7 @@ index 000000000..8d488351f
|
||||
+ [out] IWineVideoDecoder **decoder);
|
||||
+}
|
||||
diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h
|
||||
index f0068b688..f51863739 100644
|
||||
index f0068b68891..f51863739b0 100644
|
||||
--- a/dlls/dxva2/dxva2_private.h
|
||||
+++ b/dlls/dxva2/dxva2_private.h
|
||||
@@ -1,5 +1,5 @@
|
||||
@@ -317,7 +317,7 @@ index f0068b688..f51863739 100644
|
||||
+#endif /* HAVE_VAAPI */
|
||||
diff --git a/dlls/dxva2/genericdecoder.c b/dlls/dxva2/genericdecoder.c
|
||||
new file mode 100644
|
||||
index 000000000..3903d6b0b
|
||||
index 00000000000..3903d6b0b46
|
||||
--- /dev/null
|
||||
+++ b/dlls/dxva2/genericdecoder.c
|
||||
@@ -0,0 +1,432 @@
|
||||
@@ -754,7 +754,7 @@ index 000000000..3903d6b0b
|
||||
+ return S_OK;
|
||||
+}
|
||||
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
|
||||
index 0382b5fb0..3006f175b 100644
|
||||
index 0382b5fb00a..3006f175b7f 100644
|
||||
--- a/dlls/dxva2/main.c
|
||||
+++ b/dlls/dxva2/main.c
|
||||
@@ -32,6 +32,8 @@
|
||||
@@ -848,7 +848,7 @@ index 0382b5fb0..3006f175b 100644
|
||||
|
||||
return TRUE;
|
||||
diff --git a/dlls/dxva2/tests/dxva2.c b/dlls/dxva2/tests/dxva2.c
|
||||
index dcbb990ee..c28be4d8e 100644
|
||||
index dcbb990ee5c..c28be4d8e3c 100644
|
||||
--- a/dlls/dxva2/tests/dxva2.c
|
||||
+++ b/dlls/dxva2/tests/dxva2.c
|
||||
@@ -1,7 +1,7 @@
|
||||
@@ -929,7 +929,7 @@ index dcbb990ee..c28be4d8e 100644
|
||||
IDirectXVideoDecoderService_Release(service);
|
||||
diff --git a/dlls/dxva2/vaapi-mpeg2.c b/dlls/dxva2/vaapi-mpeg2.c
|
||||
new file mode 100644
|
||||
index 000000000..7b7f61db7
|
||||
index 00000000000..7b7f61db755
|
||||
--- /dev/null
|
||||
+++ b/dlls/dxva2/vaapi-mpeg2.c
|
||||
@@ -0,0 +1,753 @@
|
||||
@@ -1688,7 +1688,7 @@ index 000000000..7b7f61db7
|
||||
+#endif /* HAVE_VAAPI */
|
||||
diff --git a/dlls/dxva2/vaapi.c b/dlls/dxva2/vaapi.c
|
||||
new file mode 100644
|
||||
index 000000000..e2a64065e
|
||||
index 00000000000..e2a64065e16
|
||||
--- /dev/null
|
||||
+++ b/dlls/dxva2/vaapi.c
|
||||
@@ -0,0 +1,767 @@
|
||||
@@ -1764,7 +1764,7 @@ index 000000000..e2a64065e
|
||||
+#undef MAKE_FUNCPTR
|
||||
+
|
||||
+#define LOAD_FUNCPTR(f) \
|
||||
+ if(!(p##f = wine_dlsym(handle, #f, NULL, 0))) \
|
||||
+ if(!(p##f = dlsym(handle, #f))) \
|
||||
+ { \
|
||||
+ WARN("Can't find symbol %s.\n", #f); \
|
||||
+ goto error; \
|
||||
@@ -1772,7 +1772,7 @@ index 000000000..e2a64065e
|
||||
+
|
||||
+static void *load_libva( void )
|
||||
+{
|
||||
+ void *handle = wine_dlopen(SONAME_LIBVA, RTLD_NOW, NULL, 0);
|
||||
+ void *handle = dlopen(SONAME_LIBVA, RTLD_NOW);
|
||||
+ if (!handle)
|
||||
+ {
|
||||
+ FIXME("Wine cannot find the %s library.\n", SONAME_LIBVA);
|
||||
@@ -1808,13 +1808,13 @@ index 000000000..e2a64065e
|
||||
+ return handle;
|
||||
+
|
||||
+error:
|
||||
+ wine_dlclose(handle, NULL, 0);
|
||||
+ dlclose(handle);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void *load_libva_x11( void )
|
||||
+{
|
||||
+ void *handle = wine_dlopen(SONAME_LIBVA_X11, RTLD_NOW, NULL, 0);
|
||||
+ void *handle = dlopen(SONAME_LIBVA_X11, RTLD_NOW);
|
||||
+ if (!handle)
|
||||
+ {
|
||||
+ FIXME("Wine cannot find the %s library.\n", SONAME_LIBVA_X11);
|
||||
@@ -1825,13 +1825,13 @@ index 000000000..e2a64065e
|
||||
+ return handle;
|
||||
+
|
||||
+error:
|
||||
+ wine_dlclose(handle, NULL, 0);
|
||||
+ dlclose(handle);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void *load_libx11( void )
|
||||
+{
|
||||
+ void *handle = wine_dlopen(SONAME_LIBX11, RTLD_NOW, NULL, 0);
|
||||
+ void *handle = dlopen(SONAME_LIBX11, RTLD_NOW);
|
||||
+ if (!handle)
|
||||
+ {
|
||||
+ FIXME("Wine cannot find the %s library.\n", SONAME_LIBX11);
|
||||
@@ -1843,7 +1843,7 @@ index 000000000..e2a64065e
|
||||
+ return handle;
|
||||
+
|
||||
+error:
|
||||
+ wine_dlclose(handle, NULL, 0);
|
||||
+ dlclose(handle);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
@@ -2176,9 +2176,9 @@ index 000000000..e2a64065e
|
||||
+
|
||||
+ pXCloseDisplay(This->x11_display);
|
||||
+
|
||||
+ wine_dlclose(This->x11_handle, NULL, 0);
|
||||
+ wine_dlclose(This->va_x11_handle, NULL, 0);
|
||||
+ wine_dlclose(This->va_handle, NULL, 0);
|
||||
+ dlclose(This->x11_handle);
|
||||
+ dlclose(This->va_x11_handle);
|
||||
+ dlclose(This->va_handle);
|
||||
+
|
||||
+ CoTaskMemFree(This);
|
||||
+ }
|
||||
@@ -2440,11 +2440,11 @@ index 000000000..e2a64065e
|
||||
+ if (videoservice->x11_display)
|
||||
+ pXCloseDisplay(videoservice->x11_display);
|
||||
+ if (videoservice->x11_handle)
|
||||
+ wine_dlclose(videoservice->x11_handle, NULL, 0);
|
||||
+ dlclose(videoservice->x11_handle);
|
||||
+ if (videoservice->va_x11_handle)
|
||||
+ wine_dlclose(videoservice->va_x11_handle, NULL, 0);
|
||||
+ dlclose(videoservice->va_x11_handle);
|
||||
+ if (videoservice->va_handle)
|
||||
+ wine_dlclose(videoservice->va_handle, NULL, 0);
|
||||
+ dlclose(videoservice->va_handle);
|
||||
+
|
||||
+ CoTaskMemFree(videoservice);
|
||||
+ return NULL;
|
||||
@@ -2460,7 +2460,7 @@ index 000000000..e2a64065e
|
||||
+
|
||||
+#endif /* HAVE_VAAPI */
|
||||
diff --git a/dlls/dxva2/videoservices.c b/dlls/dxva2/videoservices.c
|
||||
index 11cba1441..84222dce5 100644
|
||||
index 11cba14417a..84222dce558 100644
|
||||
--- a/dlls/dxva2/videoservices.c
|
||||
+++ b/dlls/dxva2/videoservices.c
|
||||
@@ -1,5 +1,5 @@
|
||||
@@ -2637,5 +2637,5 @@ index 11cba1441..84222dce5 100644
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
--
|
||||
2.25.0
|
||||
2.25.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 84b8c115d10082aff224d56bebc3fbd63c0b6377 Mon Sep 17 00:00:00 2001
|
||||
From 8f9f3999c7b8cbd610fa0e91d1ffeb9a59f687c5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 4 Mar 2015 03:57:29 +0100
|
||||
Subject: [PATCH] dxva2: Add DRM mode for vaapi.
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] dxva2: Add DRM mode for vaapi.
|
||||
4 files changed, 91 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2d60234b02..7a93b20ca6 100644
|
||||
index 13584352f3e..06df84aa378 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1297,17 +1297,18 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
|
||||
@@ -1322,17 +1322,18 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
|
||||
OpenGL and Direct3D won't be supported.])
|
||||
|
||||
dnl **** Check for libva ****
|
||||
@@ -38,7 +38,7 @@ index 2d60234b02..7a93b20ca6 100644
|
||||
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h
|
||||
index 5df59bd3f0..14ac586240 100644
|
||||
index 5df59bd3f03..b1d2dd9b92d 100644
|
||||
--- a/dlls/dxva2/dxva2_private.h
|
||||
+++ b/dlls/dxva2/dxva2_private.h
|
||||
@@ -22,6 +22,7 @@
|
||||
@@ -74,7 +74,7 @@ index 5df59bd3f0..14ac586240 100644
|
||||
|
||||
static inline WineVideoServiceImpl *impl_from_IWineVideoService( IWineVideoService *iface )
|
||||
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
|
||||
index 3006f175b7..9da3995f78 100644
|
||||
index 3006f175b7f..9da3995f788 100644
|
||||
--- a/dlls/dxva2/main.c
|
||||
+++ b/dlls/dxva2/main.c
|
||||
@@ -33,6 +33,8 @@
|
||||
@@ -100,7 +100,7 @@ index 3006f175b7..9da3995f78 100644
|
||||
if (appkey) RegCloseKey(appkey);
|
||||
}
|
||||
diff --git a/dlls/dxva2/vaapi.c b/dlls/dxva2/vaapi.c
|
||||
index 4c570f5b94..1b19684053 100644
|
||||
index ef5fb5d26a6..8be65df82f7 100644
|
||||
--- a/dlls/dxva2/vaapi.c
|
||||
+++ b/dlls/dxva2/vaapi.c
|
||||
@@ -55,6 +55,7 @@ MAKE_FUNCPTR(vaEndPicture);
|
||||
@@ -117,7 +117,7 @@ index 4c570f5b94..1b19684053 100644
|
||||
|
||||
+static void *load_libva_drm( void )
|
||||
+{
|
||||
+ void *handle = wine_dlopen(SONAME_LIBVA_DRM, RTLD_NOW, NULL, 0);
|
||||
+ void *handle = dlopen(SONAME_LIBVA_DRM, RTLD_NOW);
|
||||
+ if (!handle)
|
||||
+ {
|
||||
+ FIXME("Wine cannot find the %s library.\n", SONAME_LIBVA_DRM);
|
||||
@@ -128,34 +128,34 @@ index 4c570f5b94..1b19684053 100644
|
||||
+ return handle;
|
||||
+
|
||||
+error:
|
||||
+ wine_dlclose(handle, NULL, 0);
|
||||
+ dlclose(handle);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
static void *load_libx11( void )
|
||||
{
|
||||
void *handle = wine_dlopen(SONAME_LIBX11, RTLD_NOW, NULL, 0);
|
||||
void *handle = dlopen(SONAME_LIBX11, RTLD_NOW);
|
||||
@@ -480,11 +498,18 @@ static ULONG WINAPI WineVideoService_Release( IWineVideoService *iface )
|
||||
pvaTerminate(This->va_display);
|
||||
vaapi_unlock();
|
||||
|
||||
- pXCloseDisplay(This->x11_display);
|
||||
-
|
||||
- wine_dlclose(This->x11_handle, NULL, 0);
|
||||
- wine_dlclose(This->va_x11_handle, NULL, 0);
|
||||
- wine_dlclose(This->va_handle, NULL, 0);
|
||||
- dlclose(This->x11_handle);
|
||||
- dlclose(This->va_x11_handle);
|
||||
- dlclose(This->va_handle);
|
||||
+ if (This->x11_display)
|
||||
+ pXCloseDisplay(This->x11_display);
|
||||
+ if (This->x11_handle)
|
||||
+ wine_dlclose(This->x11_handle, NULL, 0);
|
||||
+ dlclose(This->x11_handle);
|
||||
+ if (This->drm_fd > 0)
|
||||
+ close(This->drm_fd);
|
||||
+ if (This->va_drm_handle)
|
||||
+ wine_dlclose(This->va_drm_handle, NULL, 0);
|
||||
+ dlclose(This->va_drm_handle);
|
||||
+ if (This->va_x11_handle)
|
||||
+ wine_dlclose(This->va_x11_handle, NULL, 0);
|
||||
+ dlclose(This->va_x11_handle);
|
||||
+ if (This->va_handle)
|
||||
+ wine_dlclose(This->va_handle, NULL, 0);
|
||||
+ dlclose(This->va_handle);
|
||||
|
||||
CoTaskMemFree(This);
|
||||
}
|
||||
@@ -231,14 +231,14 @@ index 4c570f5b94..1b19684053 100644
|
||||
@@ -749,6 +800,10 @@ err:
|
||||
pXCloseDisplay(videoservice->x11_display);
|
||||
if (videoservice->x11_handle)
|
||||
wine_dlclose(videoservice->x11_handle, NULL, 0);
|
||||
dlclose(videoservice->x11_handle);
|
||||
+ if (videoservice->drm_fd > 0)
|
||||
+ close(videoservice->drm_fd);
|
||||
+ if (videoservice->va_drm_handle)
|
||||
+ wine_dlclose(videoservice->va_drm_handle, NULL, 0);
|
||||
+ dlclose(videoservice->va_drm_handle);
|
||||
if (videoservice->va_x11_handle)
|
||||
wine_dlclose(videoservice->va_x11_handle, NULL, 0);
|
||||
dlclose(videoservice->va_x11_handle);
|
||||
if (videoservice->va_handle)
|
||||
--
|
||||
2.17.1
|
||||
2.25.1
|
||||
|
||||
|
Reference in New Issue
Block a user