def __init__(self): manual_types_to_codes = { # These are hard-coded "manual" return codes: # the codes of the value (string, list, or tuple) # are available for a command if-and-only-if # the key type is passed as an input. "VkFormat": "VK_ERROR_FORMAT_NOT_SUPPORTED" } forward_only = { # Like the above, but these are only valid in the # "type implies return code" direction } reverse_only = { # like the above, but these are only valid in the # "return code implies type or its descendant" direction # "XrDuration": "XR_TIMEOUT_EXPIRED" } # Some return codes are related in that only one of a set # may be returned by a command # (eg. XR_ERROR_SESSION_RUNNING and XR_ERROR_SESSION_NOT_RUNNING) self.exclusive_return_code_sets = tuple( # set(("XR_ERROR_SESSION_NOT_RUNNING", "XR_ERROR_SESSION_RUNNING")), ) conventions = APIConventions() db = EntityDatabase() self.extension_cmds = get_extension_commands(db.registry) self.return_codes = get_enum_value_names(db.registry, 'VkResult') self.structure_types = get_enum_value_names(db.registry, TYPEENUM) # Dict of entity name to a list of messages to suppress. (Exclude any context data and "Warning:"/"Error:") # Keys are entity names, values are tuples or lists of message text to suppress. suppressions = {} # Initialize superclass super().__init__(entity_db=db, conventions=conventions, manual_types_to_codes=manual_types_to_codes, forward_only_types_to_codes=forward_only, reverse_only_types_to_codes=reverse_only, suppressions=suppressions)
- `-suffix` specifies suffix to add to output files, default '' - `files` are asciidoc source files from the spec to reflow. """ # For error and file-loading interfaces only import argparse import os import re import sys from reflib import loadFile, logDiag, logWarn, setLogFile from reflow_count import startVUID # Vulkan-specific - will consolidate into scripts/ like OpenXR soon sys.path.insert(0, 'xml') from vkconventions import VulkanConventions as APIConventions conventions = APIConventions() # Markup that always ends a paragraph # empty line or whitespace # [block options] # [[anchor]] # // comment # <<<< page break # :attribute-setting # macro-directive::terms # + standalone list item continuation # label:: labelled list - label must be standalone endPara = re.compile(r'^( *|\[.*\]|//.*|<<<<|:.*|[a-z]+::.*|\+|.*::)$') # Special case of markup ending a paragraph, used to track the current # command/structure. This allows for either OpenXR or Vulkan API path
def __init__(self): manual_types_to_codes = { # These are hard-coded "manual" return codes: # the codes of the value are available for a command if-and-only-if # the key type is passed as an input. # "XrSystemId": "XR_ERROR_SYSTEM_INVALID", # "XrFormFactor": ("XR_ERROR_FORM_FACTOR_UNSUPPORTED", # "XR_ERROR_FORM_FACTOR_UNAVAILABLE"), # "XrInstance": ("XR_ERROR_INSTANCE_LOST"), # "XrSession": # ("XR_ERROR_SESSION_LOST", "XR_SESSION_LOSS_PENDING"), # "XrPosef": # "XR_ERROR_POSE_INVALID", # "XrViewConfigurationType": # "XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED", # "XrEnvironmentBlendMode": # "XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED", # "XrCompositionLayerBaseHeader": ("XR_ERROR_LAYER_INVALID"), # "XrInteractionProfileSuggestedBinding": # "XR_ERROR_BINDINGS_DUPLICATED", # "XrPath": "XR_ERROR_PATH_INVALID", # "XrTime": "XR_ERROR_TIME_INVALID" } forward_only = { # Like the above, but these are only valid in the # "type implies return code" direction } reverse_only = { # like the above, but these are only valid in the # "return code implies type or its descendant" direction # "XrSession": ("XR_ERROR_SESSION_RUNNING", # "XR_ERROR_SESSION_NOT_RUNNING", # "XR_ERROR_SESSION_NOT_READY", # "XR_ERROR_SESSION_NOT_STOPPING", # "XR_SESSION_NOT_FOCUSED", # "XR_FRAME_DISCARDED"), # "XrReferenceSpaceType": "XR_SPACE_BOUNDS_UNAVAILABLE", # "XrPath": "XR_ERROR_PATH_UNSUPPORTED", # "XrDuration": "XR_TIMEOUT_EXPIRED" } # Some return codes are related in that only one of a set # may be returned by a command # (eg. XR_ERROR_SESSION_RUNNING and XR_ERROR_SESSION_NOT_RUNNING) self.exclusive_return_code_sets = ( tuple() # set(("XR_ERROR_SESSION_NOT_RUNNING", "XR_ERROR_SESSION_RUNNING")), ) conventions = APIConventions() db = EntityDatabase() self.extension_cmds = get_extension_commands(db.registry) self.return_codes = get_enum_value_names(db.registry, 'VkResult') self.structure_types = get_enum_value_names(db.registry, TYPEENUM) # Dict of entity name to a list of messages to suppress. (Exclude any context data and "Warning:"/"Error:") suppressions = {} # Initialize superclass super().__init__(entity_db=db, conventions=conventions, manual_types_to_codes=manual_types_to_codes, forward_only_types_to_codes=forward_only, reverse_only_types_to_codes=reverse_only, suppressions=suppressions)