Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Fedora Release Engineering
0e01a716ec Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:34:25 +00:00
Simone Caronni
8353545e2f Small cleanup 2026-07-01 08:28:55 +02:00
Simone Caronni
b3ca603d67 Fix for new Vulkan 1.4.341+ XML format; add parsing for both old and new format. 2026-06-25 15:33:09 +02:00
Simone Caronni
7896468712 Fix issue when two vkroots layers are installed (ex gamescope + dxvk-nvapi reflex layer) 2026-06-25 14:54:08 +02:00
6 changed files with 102 additions and 35 deletions

5
.gitignore vendored
View file

@ -1,4 +1 @@
/vkroots-e554d4c.tar.gz
/vkroots-2ceb105.tar.gz
/vkroots-5106d8a.tar.gz
/vkroots-51c3213.tar.gz
*.tar.gz

View file

@ -1,21 +0,0 @@
From e3df1afc8d2181815056a305bb596e64b388894c Mon Sep 17 00:00:00 2001
From: pchome <pchome@users.noreply.github.com>
Date: Sun, 13 Apr 2025 17:36:02 +0300
Subject: [PATCH] Fix pkgconfig install dir
---
meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 06d7117..4a1f9d2 100644
--- a/meson.build
+++ b/meson.build
@@ -18,5 +18,6 @@ pkgconfig.generate(
filebase: meson.project_name(),
name: meson.project_name(),
description: 'Vulkan layers library',
- subdirs: '.'
+ subdirs: '.',
+ install_dir: 'share/pkgconfig'
)

View file

@ -1,5 +0,0 @@
* Tue Jul 25 2023 Frantisek Zatloukal <fzatlouk@redhat.com> - 0^20230313gite554d4c-1
- Rebase to a later snapshot
* Fri Mar 03 2023 Onuralp SEZER <thunderbirdtr@fedoraproject.org> - 0^20230103git2675710-1
- Initial package vkroots

View file

@ -1 +1 @@
SHA512 (vkroots-51c3213.tar.gz) = 1c6c16897dfbdd23421b67c750b30c1e37c020fb032ebb7715c9782761b93c46bcaf8c9a810cc9e1814ee271a49072a6a2d6a2e5ce8fbb63cbb5df134e1b69fa
SHA512 (vkroots-ee76e62.tar.gz) = 71ee33568d09e69929bcbfc666119dc365ed3f2e072099f4d19148075259611f14c09049f7011eab45fcd1d96867fb4d4d8c798dbbd5c93690962493b7f01bce

View file

@ -0,0 +1,96 @@
--- a/gen/vulkan_helpers.py 2026-05-07 22:00:10.000000000 +0200
+++ b/gen/vulkan_helpers.py 2026-06-25 15:23:53.756076567 +0200
@@ -462,38 +462,51 @@
return None
members = []
- begin = None
+ proto = funcpointer.find("proto")
- for t in funcpointer.findall("type"):
- # General form:
- # <type>void</type>* pUserData,
- # Parsing of the tail (anything past </type>) is tricky since there
- # can be other data on the next line like: const <type>int</type>..
-
- const = True if begin and "const" in begin else False
- _type = t.text
- lines = t.tail.split(",\n")
- if lines[0][0] == "*":
- pointer = "*"
- name = lines[0][1:].strip()
- else:
- pointer = None
- name = lines[0].strip()
+ if proto is not None:
+ # New XML format (vulkan-headers 1.4.341+):
+ # <proto><type>void</type> <name>PFN_foo</name></proto>
+ # <param><type>typeA</type>* <name>parmA</name></param>
+ proto_type_elem = proto.find("type")
+ ret_type = proto_type_elem.text
+ ret_ptr = "*" if proto_type_elem.tail and "*" in proto_type_elem.tail else ""
+ _type = "typedef {}{} (VKAPI_PTR *".format(ret_type, ret_ptr)
+ name = proto.find("name").text
+
+ for param in funcpointer.findall("param"):
+ member = VkMember.from_xml(param, False, None)
+ if member:
+ members.append(member)
+ else:
+ # Old XML format:
+ # typedef void (VKAPI_PTR *<name>PFN_foo</name>)(
+ # <type>typeA</type>* parmA,
+ begin = None
+ for t in funcpointer.findall("type"):
+ const = True if begin and "const" in begin else False
+ param_type = t.text
+ lines = t.tail.split(",\n")
+ if lines[0][0] == "*":
+ pointer = "*"
+ param_name = lines[0][1:].strip()
+ else:
+ pointer = None
+ param_name = lines[0].strip()
- # Filter out ); if it is contained.
- name = name.partition(");")[0]
+ # Filter out ); if it is contained.
+ param_name = param_name.partition(");")[0]
+
+ try:
+ begin = lines[1].strip()
+ except IndexError:
+ begin = None
- # If tail encompasses multiple lines, assign the second line to begin
- # for the next line.
- try:
- begin = lines[1].strip()
- except IndexError:
- begin = None
+ members.append(VkMember(const=const, _type=param_type, pointer=pointer, name=param_name))
- members.append(VkMember(const=const, _type=_type, pointer=pointer, name=name))
+ _type = funcpointer.text
+ name = funcpointer.find("name").text
- _type = funcpointer.text
- name = funcpointer.find("name").text
if "requires" in funcpointer.attrib:
forward_decls = funcpointer.attrib.get("requires").split(",")
else:
@@ -2069,10 +2082,13 @@
continue
# Name is in general within a name tag else it is an optional
- # attribute on the type tag.
+ # attribute on the type tag. For the new funcpointer format,
+ # the name is nested inside <proto><name>...</name></proto>.
name_elem = t.find("name")
if name_elem is not None:
type_info["name"] = name_elem.text
+ elif t.find("proto/name") is not None:
+ type_info["name"] = t.find("proto/name").text
else:
type_info["name"] = t.attrib.get("name", None)

View file

@ -1,7 +1,7 @@
%global debug_package %{nil}
%global commit 51c32131da197a38c340da2537cbfd695e6ede78
%global commit ee76e620798612c52fb8dcc32a1058a0a3538930
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global git_date 20250716
%global git_date 20260507
Name: vkroots
Version: 0^%{git_date}git%{shortcommit}
@ -12,7 +12,7 @@ URL: https://github.com/Joshua-Ashton/vkroots
BuildArch: noarch
Source: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Patch: https://patch-diff.githubusercontent.com/raw/misyltoad/vkroots/pull/12.patch
Patch0: vkroots-fix-funcpointer-xml-format.patch
BuildRequires: meson >= 0.58.0
BuildRequires: gcc
@ -53,7 +53,7 @@ cd gen
%license LICENSE
%doc README.md
%{_includedir}/%{name}.h
%{_datadir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}.pc
%changelog