INNER CODE UNIT · Python

extract_enums

mosra/flextgl · flext.py:263

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
            # parse_xml_extensions()
            if extends in enum_extends_blacklist: continue

            # VkSamplerAddressMode from VK_KHR_sampler_mirror_clamp_to_edge
            # has an explicit value. The sanest way, yet they say "this
            # is a special case, and should not be repeated".
            if 'value' in enum.attrib:
                value = enum.attrib['value']

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…