diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/vulkaninfo_generator.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index 0dbb4276..ceea1962 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -605,7 +605,14 @@ def PrintChainBuilders(listName, structures, all_structures): if s.name in structures: out += AddGuardHeader(s) if s.sTypeName is not None: - out += f" {{{s.sTypeName}, sizeof({s.name})}},\n" + out += f" {{{s.sTypeName}, sizeof({s.name})" + # Specific versions of drivers have an incorrect definition of the size of this struct. + # We need to artificially increase it just so the driver doesn't write 'out of bounds' and cause + # difficult to debug crashes. This bug comes from the in-development version of the extension having + # a larger size than the final version, so older drivers try to writ to members which don't exist. + if s.sTypeName == "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR": + out += " + 256" # Really make sure a driver wont write out of bounds + out += f"}},\n" out += AddGuardFooter(s) out += f" }};\n" return out |
