diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/vulkaninfo_generator.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index b0b40006..bb28c06e 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -108,9 +108,10 @@ predefined_types = ['char', 'VkBool32', 'uint32_t', 'uint8_t', 'int32_t', EXTENSION_CATEGORIES = OrderedDict(( ('phys_device_props2', {'extends': 'VkPhysicalDeviceProperties2', 'type': 'both', 'holder_type': 'VkPhysicalDeviceProperties2'}), ('phys_device_mem_props2', {'extends': 'VkPhysicalDeviceMemoryProperties2', 'type': 'device', 'holder_type':'VkPhysicalDeviceMemoryProperties2'}), - ('phys_device_features2', {'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo', 'type': 'device', 'holder_type':'VkPhysicalDeviceFeatures2'}), - ('surface_capabilities2', {'extends': 'VkSurfaceCapabilities2KHR', 'type': 'both', 'holder_type':'VkSurfaceCapabilities2KHR'}), - ('format_properties2', {'extends': 'VkFormatProperties2', 'type': 'device', 'holder_type':'VkFormatProperties2'}) + ('phys_device_features2', {'extends': 'VkPhysicalDeviceFeatures2,VkDeviceCreateInfo', 'type': 'device', 'holder_type': 'VkPhysicalDeviceFeatures2'}), + ('surface_capabilities2', {'extends': 'VkSurfaceCapabilities2KHR', 'type': 'both', 'holder_type': 'VkSurfaceCapabilities2KHR'}), + ('format_properties2', {'extends': 'VkFormatProperties2', 'type': 'device', 'holder_type':'VkFormatProperties2'}), + ('queue_properties2', {'extends': 'VkQueueFamilyProperties2', 'type': 'device', 'holder_type': 'VkQueueFamilyProperties2'}) )) class VulkanInfoGeneratorOptions(GeneratorOptions): def __init__(self, @@ -531,6 +532,11 @@ def PrintStructure(struct, types_to_gen, structure_names, aliases): elif (v.arrayLength == str(8) and v.typeID == "uint8_t"): # VK_LUID_SIZE out += f" if (obj.deviceLUIDValid)" # special case out += f" p.PrintKeyString(\"{v.name}\", to_string_8(obj.{v.name}), {str(max_key_len)});\n" + elif struct.name == "VkQueueFamilyGlobalPriorityPropertiesEXT" and v.name == "priorities": + out += f" ArrayWrapper arr(p,\"{v.name}\", obj.priorityCount);\n" + out += f" for (uint32_t i = 0; i < obj.priorityCount; i++) {{\n" + out += f" Dump{v.typeID}(p, \"{v.name}\", obj.{v.name}[i]);\n" + out += f" }}\n" elif v.arrayLength.isdigit(): out += f" {{ ArrayWrapper arr(p,\"{v.name}\", "+v.arrayLength+");\n" for i in range(0, int(v.arrayLength)): @@ -717,6 +723,7 @@ def PrintChainIterator(listName, structures, all_structures, checkExtLoc, extTyp out += AddGuardFooter(s) out += f" place = structure->pNext;\n" out += f" }}\n" + out += f" p.UnsetSubHeader();\n" out += f"}}\n" return out |
