[vlc-devel] [PATCH 2/3] vukan: refactor Makefile.am for Vulkan plugins
Rémi Denis-Courmont
remi at remlab.net
Tue Apr 7 11:44:07 CEST 2020
Hi,
You can argue either way. But the fact that there's no WL support until this set supports my opinion that devs tend to be tied to some platforms/WSI. There's also the fact that WL has rather peculiar WSI semantics, as we already saw with EGL (and it's more or less the same problem here).
Le 7 avril 2020 11:53:31 GMT+03:00, Alexandre Janniaux <ajanni at videolabs.io> a écrit :
>Hi,
>
>Then the platform_xcb should probably be in xcb right?
>
>The rationale behind that is mostly that while you might
>care about xcb windowing, you might not care about vulkan
>but only opengl or so, and vulkan modules are currently
>using VULKAN_COMMONSOURCE variable and it was more meaningful
>to have the clients of this variable in the same file where
>it is declared.
>
>As far as I see for Vulkan, the knowledge of the platform
>integration is more related to vulkan than the underlying
>platforms. For example you need to use the correct Vulkan
>define to enable the WSI and the correct structure, and
>internal vulkan details like presentation mode but you don't
>need to know about wayland threading or registry.
>
>Thus, the split made sense to me.
>
>Regards,
>--
>Alexandre Janniaux
>Videolabs
>
>On Tue, Apr 07, 2020 at 10:54:03AM +0300, Rémi Denis-Courmont wrote:
>> Hi,
>>
>> That seems contradictory. We can't both sort by windowing system and
>by rendering library. At least the windowing system glue plugins ought
>to be in their respective windowing system directory, and where
>applicable, Makefile.
>>
>> And that comes down to who maintains the glue. Typically that's
>individuals typically caring and knowing about the platform, more so
>than about the renderer.
>>
>> Fine for the generic Vulkan stuff though.
>>
>> Le 6 avril 2020 20:01:51 GMT+03:00, Alexandre Janniaux
><ajanni at videolabs.io> a écrit :
>> >Much like video_output/xcb, gather all Vulkan-related plugins
>> >compilation targets in the vulkan subfolder, but still use the
>> >vout_LTLIBRARIES variable to enable targets.
>> >---
>> > modules/video_output/Makefile.am | 42 +------------------
>> > modules/video_output/vulkan/Makefile.am | 54
>+++++++++++++++++++++++++
>> > modules/video_output/xcb/Makefile.am | 11 -----
>> > 3 files changed, 56 insertions(+), 51 deletions(-)
>> > create mode 100644 modules/video_output/vulkan/Makefile.am
>> >
>> >diff --git a/modules/video_output/Makefile.am
>> >b/modules/video_output/Makefile.am
>> >index a61d15f20f..c82e9a0ed7 100644
>> >--- a/modules/video_output/Makefile.am
>> >+++ b/modules/video_output/Makefile.am
>> >@@ -119,49 +119,11 @@ vout_LTLIBRARIES +=
>libglinterop_vdpau_plugin.la
>> > endif
>> > endif # HAVE_GL
>> >
>> >-### Vulkan ###
>> >-
>> >-VULKAN_COMMONSOURCES = video_output/vulkan/instance.c \
>> >- video_output/vulkan/instance.h \
>> >- video_output/vulkan/platform.h \
>> >- video_output/placebo_utils.c \
>> >- video_output/placebo_utils.h
>> >-
>> >-# Trigger the c++ linker because of glslang dependency of
>libplacebo
>> >-VULKAN_COMMONSOURCES += dummy.cpp
>> >-
>> >-VULKAN_COMMONCFLAGS = $(VULKAN_CFLAGS) $(LIBPLACEBO_CFLAGS)
>> >-VULKAN_COMMONLIBS = $(VULKAN_LIBS) $(LIBPLACEBO_LIBS)
>> >-
>> >-libvk_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES)
>> >video_output/vulkan/display.c
>> >-libvk_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS)
>> >-libvk_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
>> >-
>> >-libvk_win32_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES)
>> >video_output/vulkan/surface.c \
>> >- video_output/vulkan/platform_win32.c
>> >-libvk_win32_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS)
>\
>> >- -DVK_USE_PLATFORM_WIN32_KHR -DPLATFORM_NAME=Win32
>> >-libvk_win32_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
>> >-
>> >-libvk_android_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES)
>> >video_output/vulkan/surface.c \
>> >- video_output/vulkan/platform_android.c
>> >-libvk_android_plugin_la_CFLAGS = $(AM_CFLAGS)
>$(VULKAN_COMMONCFLAGS) \
>> >- -DVK_USE_PLATFORM_ANDROID_KHR -DPLATFORM_NAME=Android
>> >-libvk_android_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
>> >-
>> >-if HAVE_VULKAN
>> >-vout_LTLIBRARIES += libvk_plugin.la
>> >-if HAVE_WIN32_DESKTOP
>> >-vout_LTLIBRARIES += libvk_win32_plugin.la
>> >-endif
>> >-if HAVE_ANDROID
>> >-vout_LTLIBRARIES += libvk_android_plugin.la
>> >-endif
>> >-endif
>> >-
>> > ### X11 ###
>> > include video_output/xcb/Makefile.am
>> >
>> >+### Vulkan ###
>> >+include video_output/vulkan/Makefile.am
>> >
>> > ### Wayland ###
>> > include video_output/wayland/Makefile.am
>> >diff --git a/modules/video_output/vulkan/Makefile.am
>> >b/modules/video_output/vulkan/Makefile.am
>> >new file mode 100644
>> >index 0000000000..e769232575
>> >--- /dev/null
>> >+++ b/modules/video_output/vulkan/Makefile.am
>> >@@ -0,0 +1,54 @@
>> >+
>> >+### Vulkan ###
>> >+
>> >+VULKAN_COMMONSOURCES = video_output/vulkan/instance.c \
>> >+ video_output/vulkan/instance.h \
>> >+ video_output/vulkan/platform.h \
>> >+ video_output/placebo_utils.c \
>> >+ video_output/placebo_utils.h
>> >+
>> >+# Trigger the c++ linker because of glslang dependency of
>libplacebo
>> >+VULKAN_COMMONSOURCES += dummy.cpp
>> >+
>> >+VULKAN_COMMONCFLAGS = $(VULKAN_CFLAGS) $(LIBPLACEBO_CFLAGS)
>> >+VULKAN_COMMONLIBS = $(VULKAN_LIBS) $(LIBPLACEBO_LIBS)
>> >+
>> >+libvk_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES)
>> >video_output/vulkan/display.c
>> >+libvk_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS)
>> >+libvk_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
>> >+
>> >+libvk_win32_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES)
>> >video_output/vulkan/surface.c \
>> >+ video_output/vulkan/platform_win32.c
>> >+libvk_win32_plugin_la_CFLAGS = $(AM_CFLAGS) $(VULKAN_COMMONCFLAGS)
>\
>> >+ -DVK_USE_PLATFORM_WIN32_KHR -DPLATFORM_NAME=Win32
>> >+libvk_win32_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
>> >+
>> >+libvk_android_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES)
>> >video_output/vulkan/surface.c \
>> >+ video_output/vulkan/platform_android.c
>> >+libvk_android_plugin_la_CFLAGS = $(AM_CFLAGS)
>$(VULKAN_COMMONCFLAGS) \
>> >+ -DVK_USE_PLATFORM_ANDROID_KHR -DPLATFORM_NAME=Android
>> >+libvk_android_plugin_la_LIBADD = $(VULKAN_COMMONLIBS)
>> >+
>> >+libvk_x11_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) \
>> >+ video_output/vulkan/surface.c \
>> >+ video_output/vulkan/platform_xcb.c
>> >+libvk_x11_plugin_la_CFLAGS = $(AM_CFLAGS) \
>> >+ $(XCB_CFLAGS) $(VULKAN_COMMONCFLAGS) \
>> >+ -DVK_USE_PLATFORM_XCB_KHR -DPLATFORM_NAME=X11
>> >+libvk_x11_plugin_la_LIBADD = $(VULKAN_COMMONLIBS) $(XCB_LIBS)
>> >+
>> >+if HAVE_VULKAN
>> >+vout_LTLIBRARIES += libvk_plugin.la
>> >+
>> >+if HAVE_XCB
>> >+vout_LTLIBRARIES += libvk_x11_plugin.la
>> >+endif
>> >+
>> >+if HAVE_WIN32_DESKTOP
>> >+vout_LTLIBRARIES += libvk_win32_plugin.la
>> >+endif
>> >+
>> >+if HAVE_ANDROID
>> >+vout_LTLIBRARIES += libvk_android_plugin.la
>> >+endif
>> >+endif
>> >diff --git a/modules/video_output/xcb/Makefile.am
>> >b/modules/video_output/xcb/Makefile.am
>> >index f946e07ce7..52d0304ec5 100644
>> >--- a/modules/video_output/xcb/Makefile.am
>> >+++ b/modules/video_output/xcb/Makefile.am
>> >@@ -32,14 +32,6 @@ libxcb_window_plugin_la_CFLAGS = $(AM_CFLAGS) \
>> > libxcb_window_plugin_la_LIBADD = $(XPROTO_LIBS) $(XCB_LIBS) \
>> > $(XCB_XKB_LIBS) $(XKBCOMMON_X11_LIBS)
>> >
>> >-libvk_x11_plugin_la_SOURCES = $(VULKAN_COMMONSOURCES) \
>> >- video_output/vulkan/surface.c \
>> >- video_output/vulkan/platform_xcb.c
>> >-libvk_x11_plugin_la_CFLAGS = $(AM_CFLAGS) \
>> >- $(XCB_CFLAGS) $(VULKAN_COMMONCFLAGS) \
>> >- -DVK_USE_PLATFORM_XCB_KHR -DPLATFORM_NAME=X11
>> >-libvk_x11_plugin_la_LIBADD = $(VULKAN_COMMONLIBS) $(XCB_LIBS)
>> >-
>> > libegl_x11_plugin_la_SOURCES = video_output/opengl/egl.c
>> > libegl_x11_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_PLATFORM_X11=1
>> > libegl_x11_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS)
>> >@@ -61,9 +53,6 @@ libxcb_window_plugin_la_SOURCES += \
>> > video_output/xcb/vlc_xkb.h video_output/xcb/xkb.c
>> > libxcb_window_plugin_la_CFLAGS += -DHAVE_XKBCOMMON
>> > endif
>> >-if HAVE_VULKAN
>> >-vout_LTLIBRARIES += libvk_x11_plugin.la
>> >-endif
>> > if HAVE_EGL
>> > vout_LTLIBRARIES += libegl_x11_plugin.la
>> > endif
>> >--
>> >2.26.0
>> >
>> >_______________________________________________
>> >vlc-devel mailing list
>> >To unsubscribe or modify your subscription options:
>> >https://mailman.videolan.org/listinfo/vlc-devel
>>
>> --
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser ma brièveté.
>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200407/55866896/attachment.html>
More information about the vlc-devel
mailing list