mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
vulkan: Allow the same item to show up twice in core version <requires>
The way the XML is being organized these days, they're doing one <requires> section for each promoted thing and if something gets promoted twice by different extensions. As long as we grab the lowest of those core versions, we should be fine. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
This commit is contained in:
parent
25eee91016
commit
6fe6c42903
1 changed files with 7 additions and 2 deletions
|
|
@ -104,6 +104,9 @@ class VkVersion:
|
|||
|
||||
return self.__int_ver() > other.__int_ver()
|
||||
|
||||
def __le__(self, other):
|
||||
return not self.__gt__(other)
|
||||
|
||||
# Sort the extension list the way we expect: KHR, then EXT, then vendors
|
||||
# alphabetically. For digits, read them as a whole number sort that.
|
||||
# eg.: VK_KHR_8bit_storage < VK_KHR_16bit_storage < VK_EXT_acquire_xlib_display
|
||||
|
|
@ -199,8 +202,10 @@ def get_all_required(xml, thing, api, beta):
|
|||
version = VkVersion(feature.attrib['number'])
|
||||
for t in feature.findall('./require/' + thing):
|
||||
name = t.attrib['name']
|
||||
assert name not in things
|
||||
things[name] = Requirements(core_version=version)
|
||||
if name in things:
|
||||
assert things[name].core_version <= version
|
||||
else:
|
||||
things[name] = Requirements(core_version=version)
|
||||
|
||||
for extension in xml.findall('.extensions/extension'):
|
||||
ext = Extension.from_xml(extension)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue