1// Copyright 2014-2023 The Khronos Group Inc. 2// SPDX-License-Identifier: CC-BY-4.0 3 4= Vulkan^(R)^ Specification Repository Scripts 5 6This directory contains scripts used in building the Vulkan API 7specification and related artifacts. For the most part, these scripts are 8invoked from the top-level directory or from the API Registry in 9../xml to build generated components of the specification. 10 11Scripts in this directory include: 12 13 * `genvk.py` - Python script to generate Vulkan headers and some other 14 targets, using the generators described below. 15 * `reg.py` - Python tools to read a registry XML file and call into 16 generators to create headers and other types of output. 17 * `conventions.py`, `vkconventions.py`, `apiconventions.py` - API-specific 18 parameters and formatting / style conventions used by generators. 19 * `generator.py` - output generator base class. 20 ** `cgenerator.py` - C header output generator. 21 ** `docgenerator.py` - Asciidoc interface language include generator. 22 ** `extensionmetadocgenerator.py` - Generator for Asciidoc extension 23 descriptions in spec appendices. 24 ** `hostsyncgenerator.py` - Asciidoc host sync table generator. 25 ** `interfacedocgenerator.py` - Asciidoc extension appendix interface 26 generator. 27 ** `pygenerator.py, `rubygenerator.py`, `scriptgenerator.py` - generate 28 Python and Ruby encodings of parts of the API description for use in 29 other scripts and asciidoctor extensions. 30 ** `spirvcapgenerator.py` - Asciidoc generator for SPIR-V capability 31 tables. 32 ** `validitygenerator.py` - Asciidoc validity language generator. 33 34 * `check_spec_links.py` - validates a variety of markup and content in the 35 Asciidoctor specification source. 36 * `conventions.py`, `vkconventions.py` - API-specific options used by 37 scripts shared with OpenXR and other APIs. 38 * `extdependency.py` - generate extension dependencies for use when 39 building the specification. 40 * `genRelease`, `genspec.py` - build HTML and PDF Specifications with a 41 variety of options to control target directories, extensions included 42 while building, etc. 43 * `genRef.py`, `reflib.py`, `makemanaliases.py` - extract API reference 44 pages from specification source into single-page source documents, and 45 create symbolic links in the generated refpage HTML for API aliases. 46 * `indexExt.py` - generate HTML index of all extensions for inclusion into 47 the Vulkan registry index page. 48 * `reflow.py`, `reflow_count.py` - reflow specification source text to 49 follow style guidelines, and insert Valid Usage statements where they 50 are needed. 51 * `test_check_spec_links.py`, `test_check_spec_links_api_specific.py`, 52 `test_entity_db.py` - these are from another Khronos WG repository and 53 are unused by Vulkan at present. 54 * `xml_consistency.py` - perform some internal consistency checks on 55 `vk.xml`. 56 57 * `compImages.sh` - compare images in two branches. 58 * `htmldiff/htmldiff` - HTML diff script (see below). 59 * `Retired/` - contains obsolete, unused, or single-purpose scripts. Not 60 maintained. 61 62== HTML Diff Script for Vulkan 63 64This is a first cut at a script to compare Vulkan HTML specifications. Usage 65is simply 'htmldiff file1.html file2.html > diff.html'. The script does not 66copy CSS and images required by the input specs, so it is best to generate 67the output in the same directory as one of the inputs. However, the script 68must be invoked from the directory it is located within. 69 70The scripts used require Python and Perl. Additionally, the python 71'utidylib' module and the underlying libtidy C library are required. 72On Debian Linux, it may be necessary to install the 'python-utidylib' and 73'libtidy' packages if they are not already present. 74 75The scripts are taken from the code backing the 76 77 http://services.w3.org/htmldiff 78 79website. `htmldiff` is the Python driver script. `htmldiff.pl` is the 80Perl script which generates the diff after preprocessing of the input 81HTML by `htmldiff`. `htmldiff.orig` is the original Python script from 82the website, modified to run at the command line instead of as a CGI 83script. 84