aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorziga-lunarg <ziga@lunarg.com>2024-01-05 17:48:50 +0100
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2024-01-05 12:47:04 -0600
commit1a84e811a47143d0dc63471e28555a4f6c369bfc (patch)
tree68c3167c41ae3c02174887d59f2df39442b6ba2c /scripts
parente21dc3deb042f6354320222903214f491b7b6ad0 (diff)
downloadusermoji-1a84e811a47143d0dc63471e28555a4f6c369bfc.tar.xz
vulkaninfo: Fix promoted structure exceptions
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vulkaninfo_generator.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py
index 59cd3f37..d5008d10 100644
--- a/scripts/vulkaninfo_generator.py
+++ b/scripts/vulkaninfo_generator.py
@@ -92,6 +92,8 @@ STRUCT_COMPARISONS_TO_GEN = ['VkSurfaceFormatKHR', 'VkSurfaceFormat2KHR', 'VkSur
'VkSurfaceCapabilities2KHR', 'VkSurfaceCapabilities2EXT']
# don't generate these structures
STRUCT_BLACKLIST = ['VkVideoProfileListInfoKHR', 'VkVideoProfileInfoKHR', 'VkDrmFormatModifierPropertiesListEXT', 'VkDrmFormatModifierPropertiesEXT', 'VkDrmFormatModifierPropertiesList2EXT']
+# These structures are only used in version 1.1, otherwise they are included in the promoted structs
+STRUCT_1_1_LIST = ['VkPhysicalDeviceProtectedMemoryFeatures', 'VkPhysicalDeviceShaderDrawParametersFeatures', 'VkPhysicalDeviceSubgroupProperties', 'VkPhysicalDeviceProtectedMemoryProperties']
# generate these structures such that they only print when not in json mode (as json wants them separate)
PORTABILITY_STRUCTS = ['VkPhysicalDevicePortabilitySubsetFeaturesKHR', 'VkPhysicalDevicePortabilitySubsetPropertiesKHR']
@@ -801,7 +803,9 @@ def PrintChainStruct(listName, structures, all_structures, chain_details, extTyp
else:
assert False, 'Should never get here'
if has_version:
- if has_printed_condition:
+ if s.name in STRUCT_1_1_LIST:
+ out += f'{version_desc} == {version.constant}'
+ elif has_printed_condition:
out += f')\n && {version_desc} < {version.constant}'
else:
out += f'{version_desc} >= {version.constant}'
@@ -891,7 +895,9 @@ void setup_{listName}_chain({chain_details['holder_type']}& start, std::unique_p
else:
assert False, 'Should never get here'
if has_version:
- if has_printed_condition:
+ if s.name in STRUCT_1_1_LIST:
+ out += f'{version_desc} == {version.constant}'
+ elif has_printed_condition:
out += f') &&\n {version_desc} < {version.constant}'
else:
out += f'{version_desc} >= {version.constant}'