Beispiel #1
0
    baseDir = results.baseDir

    # Dictionary of pages & aliases
    pages = {}

    for file in results.files:
        d = genRef(file, baseDir)
        pages.update(d)

    # Now figure out which pages *weren't* generated from the spec.
    # This relies on the dictionaries of API constructs in the api module.

    if not results.noauto:

        registry = Registry()
        registry.loadFile(results.registry)

        if conventions.write_refpage_include:
            # Only extensions with a supported="..." attribute in this set
            # will be considered for extraction/generation.
            supported_strings = set((conventions.xml_supported_name_of_api, ))
            ext_names = set(k for k, v in registry.extdict.items()
                            if v.supported in supported_strings)

            desired_extensions = ext_names.intersection(set(results.extension))
            for prefix in conventions.extension_index_prefixes:
                # Splits up into chunks, sorted within each chunk.
                filtered_extensions = sorted([
                    name for name in desired_extensions
                    if name.startswith(prefix) and name not in extensions
                ])
Beispiel #2
0
    parser.add_argument('-quiet',
                        action='store_true',
                        default=False,
                        help='Suppress script output during normal execution.')

    args = parser.parse_args()

    # This splits arguments which are space-separated lists
    args.feature = [name for arg in args.feature for name in arg.split()]
    args.extension = [name for arg in args.extension for name in arg.split()]

    # Load & parse registry
    reg = Registry()

    startTimer(args.time)
    reg.loadFile(args.registry)
    endTimer(args.time, '* Time to make and parse ElementTree =')

    if args.validate:
        reg.validateGroups()

    if args.dump:
        write('* Dumping registry to regdump.txt', file=sys.stderr)
        reg.dumpReg(filehandle=open('regdump.txt', 'w', encoding='utf-8'))

    # create error/warning & diagnostic files
    errWarn = open(args.errfile, 'w',
                   encoding='utf-8') if args.errfile else sys.stderr
    diag = open(args.diagfile, 'w',
                encoding='utf-8') if args.diagfile else None
 def makeRegistry(self):
     root = Path(__file__).resolve().parent.parent.parent
     registryFile = str(root / 'specification/registry/xr.xml')
     registry = Registry()
     registry.loadFile(registryFile)
     return registry
Beispiel #4
0
import filecmp
import optparse
import os
import platform
import sys
from os import path
from string import Template
from subprocess import call

vulkan_reg_path = path.join(path.dirname(__file__), "..", "..", "third_party",
                            "vulkan_headers", "registry")
sys.path.append(vulkan_reg_path)
from reg import Registry

registry = Registry()
registry.loadFile(open(path.join(vulkan_reg_path, "vk.xml")))

VULKAN_REQUIRED_API_VERSION = 'VK_API_VERSION_1_1'

VULKAN_UNASSOCIATED_FUNCTIONS = [{
    'functions': [
        # vkGetInstanceProcAddr belongs here but is handled specially.
        'vkEnumerateInstanceVersion',
        'vkCreateInstance',
        'vkEnumerateInstanceExtensionProperties',
        'vkEnumerateInstanceLayerProperties',
    ]
}]

VULKAN_INSTANCE_FUNCTIONS = [
    {
 def makeRegistry(self):
     registryFile = str(ROOT / 'xml/vk.xml')
     registry = Registry()
     registry.loadFile(registryFile)
     return registry
Beispiel #6
0
 def makeRegistry(self):
     registryFile = str(ROOT / 'xml/vk.xml')
     registry = Registry()
     registry.loadFile(registryFile)
     return registry
Beispiel #7
0
    setLogFile(True,  True, results.logFile)
    setLogFile(True, False, results.diagFile)
    setLogFile(False, True, results.warnFile)

    baseDir = results.baseDir

    for file in results.files:
        genRef(file, baseDir)

    # Now figure out which pages *weren't* generated from the spec.
    # This relies on the dictionaries of API constructs in the api module.

    if not results.noauto:

        registry = Registry()
        registry.loadFile(results.registry)

        if conventions.write_refpage_include:
            # Only extensions with a supported="..." attribute in this set
            # will be considered for extraction/generation.
            supported_strings = set((conventions.xml_supported_name_of_api,))
            ext_names = set(k for k, v in registry.extdict.items()
                            if v.supported in supported_strings)

            desired_extensions = ext_names.intersection(set(results.extension))
            for prefix in conventions.extension_index_prefixes:
                # Splits up into chunks, sorted within each chunk.
                filtered_extensions = sorted(
                    [name for name in ext_names
                     if name.startswith(prefix) and name not in extensions])
                for name in filtered_extensions: