aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMike Schuchardt <mikes@lunarg.com>2025-09-19 13:37:19 -0700
committerMike Schuchardt <mikes@lunarg.com>2025-09-22 08:14:43 -0700
commit22fee0e85d0d31af603bf591f70530c1c83ba186 (patch)
treed3986427dcf335f37d09924840ffa7f3b17bdcd5 /scripts
parente76d0e871d057960c61fa96fb3a595007e5e2194 (diff)
downloadusermoji-22fee0e85d0d31af603bf591f70530c1c83ba186.tar.xz
scripts: Vulkaninfo video codegen now uses vendor extensions
vulkaninfo typically excludes vendor extensions, but video extensions are excluded from this. The extension categories struct definitions now have a new member 'ignore_vendor_exclusions' to control whether that category include vendor extensions.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vulkaninfo_generator.py34
1 files changed, 24 insertions, 10 deletions
diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py
index 8d84a316..20e408e4 100644
--- a/scripts/vulkaninfo_generator.py
+++ b/scripts/vulkaninfo_generator.py
@@ -119,56 +119,65 @@ EXTENSION_CATEGORIES = OrderedDict((
'type': EXTENSION_TYPE_BOTH,
'holder_type': 'VkPhysicalDeviceProperties2',
'print_iterator': True,
- 'can_show_promoted_structs': True}),
+ 'can_show_promoted_structs': True,
+ 'ignore_vendor_exclusion': False}),
('phys_device_mem_props2',
{'extends': 'VkPhysicalDeviceMemoryProperties2',
'type': EXTENSION_TYPE_DEVICE,
'holder_type':'VkPhysicalDeviceMemoryProperties2',
'print_iterator': False,
- 'can_show_promoted_structs': False}),
+ 'can_show_promoted_structs': False,
+ 'ignore_vendor_exclusion': False}),
('phys_device_features2',
{'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo',
'type': EXTENSION_TYPE_DEVICE,
'holder_type': 'VkPhysicalDeviceFeatures2',
'print_iterator': True,
- 'can_show_promoted_structs': True}),
+ 'can_show_promoted_structs': True,
+ 'ignore_vendor_exclusion': False}),
('surface_capabilities2',
{'extends': 'VkSurfaceCapabilities2KHR',
'type': EXTENSION_TYPE_BOTH,
'holder_type': 'VkSurfaceCapabilities2KHR',
'print_iterator': True,
'can_show_promoted_structs': False,
+ 'ignore_vendor_exclusion': False,
'exclude': ['VkSurfacePresentScalingCapabilitiesKHR', 'VkSurfacePresentModeCompatibilityKHR']}),
('format_properties2',
{'extends': 'VkFormatProperties2',
'type': EXTENSION_TYPE_DEVICE,
'holder_type':'VkFormatProperties2',
'print_iterator': True,
- 'can_show_promoted_structs': False}),
+ 'can_show_promoted_structs': False,
+ 'ignore_vendor_exclusion': False}),
('queue_properties2',
{'extends': 'VkQueueFamilyProperties2',
'type': EXTENSION_TYPE_DEVICE,
'holder_type': 'VkQueueFamilyProperties2',
'print_iterator': True,
- 'can_show_promoted_structs': False}),
+ 'can_show_promoted_structs': False,
+ 'ignore_vendor_exclusion': False}),
('video_profile_info',
{'extends': 'VkVideoProfileInfoKHR',
'type': EXTENSION_TYPE_DEVICE,
'holder_type': 'VkVideoProfileInfoKHR',
'print_iterator': True,
- 'can_show_promoted_structs': False}),
+ 'can_show_promoted_structs': False,
+ 'ignore_vendor_exclusion': True}),
('video_capabilities',
{'extends': 'VkVideoCapabilitiesKHR',
'type': EXTENSION_TYPE_DEVICE,
'holder_type': 'VkVideoCapabilitiesKHR',
'print_iterator': True,
- 'can_show_promoted_structs': False}),
+ 'can_show_promoted_structs': False,
+ 'ignore_vendor_exclusion': True,}),
('video_format_properties',
{'extends': 'VkVideoFormatPropertiesKHR',
'type': EXTENSION_TYPE_DEVICE,
'holder_type': 'VkVideoFormatPropertiesKHR',
'print_iterator': True,
- 'can_show_promoted_structs': False})
+ 'can_show_promoted_structs': False,
+ 'ignore_vendor_exclusion': True})
))
class VulkanInfoGeneratorOptions(GeneratorOptions):
def __init__(self,
@@ -856,16 +865,21 @@ std::vector<std::unique_ptr<AppVideoProfile>> enumerate_supported_video_profiles
self.all_structures.append(VulkanStructure(
name, typeinfo.elem, self.constants, self.extTypes))
+ is_vendor_type = False
for vendor in self.vendor_abbreviations:
for node in typeinfo.elem.findall('member'):
if node.get('values') is not None:
if node.get('values').find(vendor) != -1:
- return
+ is_vendor_type = True
+ break
+ if is_vendor_type:
+ break
for key, value in EXTENSION_CATEGORIES.items():
if str(typeinfo.elem.get('structextends')).find(value.get('extends')) != -1:
if value.get('exclude') is None or name not in value.get('exclude'):
- self.extension_sets[key].add(name)
+ if not is_vendor_type or value.get('ignore_vendor_exclusion'):
+ self.extension_sets[key].add(name)
# finds all the ranges of formats from core (1.0), core versions (1.1+), and extensions
def findFormatRanges(self):