[vlc-devel] [PATCH v2 1/3] contrib: add vulkan-headers rules

Alexandre Janniaux ajanni at videolabs.io
Mon Nov 9 14:22:35 CET 2020


Hi,

On Mon, Nov 09, 2020 at 01:40:42PM +0200, Rémi Denis-Courmont wrote:
> Le sunnuntaina 8. marraskuuta 2020, 17.37.03 EET Alexandre Janniaux a écrit :
> > ---
> >  contrib/src/vulkan-headers/SHA512SUMS |  1 +
> >  contrib/src/vulkan-headers/rules.mak  | 20 ++++++++++++++++++++
> >  2 files changed, 21 insertions(+)
> >  create mode 100644 contrib/src/vulkan-headers/SHA512SUMS
> >  create mode 100644 contrib/src/vulkan-headers/rules.mak
> >
> > diff --git a/contrib/src/vulkan-headers/SHA512SUMS
> > b/contrib/src/vulkan-headers/SHA512SUMS new file mode 100644
> > index 0000000000..34574ab872
> > --- /dev/null
> > +++ b/contrib/src/vulkan-headers/SHA512SUMS
> > @@ -0,0 +1 @@
> > +7472ec31fe74bc3a98303f668eb0c88bf4e4a93b1e3bcf4df2b20fe731cc2efd754d8b64e65
> > 07d8ee470841ee575c3092b2b20c4325a44e2e5cd830b7c7dc8ab
> > Vulkan-Headers-1.1.127.tar.gz diff --git
> > a/contrib/src/vulkan-headers/rules.mak
> > b/contrib/src/vulkan-headers/rules.mak new file mode 100644
> > index 0000000000..edf1402c51
> > --- /dev/null
> > +++ b/contrib/src/vulkan-headers/rules.mak
> > @@ -0,0 +1,20 @@
> > +VULKAN_HEADER_VERSION := 1.1.127
> > +VULKAN_HEADER_URL :=
> > https://github.com/KhronosGroup/Vulkan-Headers/archive/v$(VULKAN_HEADER_VER
> > SION).tar.gz +VULKAN_HEADER_ARCHIVE :=
> > Vulkan-Headers-$(VULKAN_HEADER_VERSION).tar.gz +
> > +DEPS_vulkan-headers =
> > +
> > +$(TARBALLS)/$(VULKAN_HEADER_ARCHIVE):
> > +	$(call download_pkg,$(VULKAN_HEADER_URL),vulkan-headers)
> > +
> > +.sum-vulkan-headers: $(VULKAN_HEADER_ARCHIVE)
> > +
> > +vulkan-headers: $(VULKAN_HEADER_ARCHIVE) .sum-vulkan-headers
> > +	$(UNPACK)
> > +	$(MOVE)
> > +
> > +.vulkan-headers: vulkan-headers toolchain.cmake
> > +	cd $< && rm -rf ./build && mkdir -p build
> > +	cd $</build && $(HOSTVARS) $(CMAKE) .. -G Ninja
> > +	cd $< && cd build && ninja install
> > +	touch $@
>
> Detection seems missing. If this is somehow Win32-only and assumed to be never
> available from the system, the name should probably reflect it.

Unfortunately on linux, there's no split between the ICD loader
pkg-config and the vulkan headers themselves. I could detect
vulkan anyway and disable them both in this case, but I'm not
sure it's relevant for the current state of this contrib.

I'm currently only targetting Windows because it's difficult
enough to make this work, but ultimately we probably want this
for more than just Windows (like for the raspbian build probably
now that Raspberry 4 has/is close to have a vulkan driver).

Maybe I could try not depending upon vulkan-header except for
the vulkan-loader itself? It would probably make more sense.
Otherwise, I need header detection, which currently has no
occurrence in contribs and felt overengineered when I wrote
this contrib.

Regards,
--
Alexandre Janniaux
Videolabs


More information about the vlc-devel mailing list