INNER CODE UNIT · Python

xml_parse_type_name_pair

mosra/flextgl · flext.py:255

def xml_parse_type_name_pair(node):
    name = node.find('name').text.strip()
    type = xml_extract_all_text(node, {'name':''})
    # gl.xml has <ptype> while vk.xml has <type>
    ptype = node.find('ptype')
    if ptype == None: ptype = node.find('type')
    return (name, type, ptype.text.strip() if ptype != None else None)

def extract_enums(root, feature, enum_extensions, *, extension_number=None, enum_extends_blacklist=set()):
    subsetEnums = []

    for enum in feature.findall('enum'):
        enum_name = enum.attrib['name']

        if 'extends' in enum.attrib:
            extends = enum.attrib['extends']

            # See the comment about VK_KHR_sampler_ycbcr_conversion in

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…