├── .gitignore ├── config ├── .gitignore ├── asciidoctor-mathematical-ext.rb ├── vu-to-json.rb ├── extension-highlighter.rb ├── loadable_html.rb ├── katex_replace.rb ├── chunkindex │ ├── custom.patch │ ├── build-index.js │ ├── README.adoc │ ├── generate-index.rb │ ├── chunked.css │ └── chunked.js ├── README.md ├── attribs.txt ├── spec-macros.rb ├── vu-to-json │ └── vu_schema.json ├── loadable_html │ └── extension.rb ├── tilde_open_block.rb ├── katex_replace │ └── extension.rb ├── optimize-pdf ├── makeSubmit.py └── spec-macros │ └── extension.rb ├── katex ├── fonts │ ├── KaTeX_Main-Bold.ttf │ ├── KaTeX_Main-Bold.woff │ ├── KaTeX_AMS-Regular.ttf │ ├── KaTeX_AMS-Regular.woff │ ├── KaTeX_Fraktur-Bold.ttf │ ├── KaTeX_Main-Bold.woff2 │ ├── KaTeX_Main-Italic.ttf │ ├── KaTeX_Main-Italic.woff │ ├── KaTeX_Main-Regular.ttf │ ├── KaTeX_Math-Italic.ttf │ ├── KaTeX_Math-Italic.woff │ ├── KaTeX_AMS-Regular.woff2 │ ├── KaTeX_Fraktur-Bold.woff │ ├── KaTeX_Fraktur-Bold.woff2 │ ├── KaTeX_Fraktur-Regular.ttf │ ├── KaTeX_Main-BoldItalic.ttf │ ├── KaTeX_Main-Italic.woff2 │ ├── KaTeX_Main-Regular.woff │ ├── KaTeX_Main-Regular.woff2 │ ├── KaTeX_Math-BoldItalic.ttf │ ├── KaTeX_Math-Italic.woff2 │ ├── KaTeX_SansSerif-Bold.ttf │ ├── KaTeX_SansSerif-Bold.woff │ ├── KaTeX_Script-Regular.ttf │ ├── KaTeX_Script-Regular.woff │ ├── KaTeX_Size1-Regular.ttf │ ├── KaTeX_Size1-Regular.woff │ ├── KaTeX_Size1-Regular.woff2 │ ├── KaTeX_Size2-Regular.ttf │ ├── KaTeX_Size2-Regular.woff │ ├── KaTeX_Size2-Regular.woff2 │ ├── KaTeX_Size3-Regular.ttf │ ├── KaTeX_Size3-Regular.woff │ ├── KaTeX_Size3-Regular.woff2 │ ├── KaTeX_Size4-Regular.ttf │ ├── KaTeX_Size4-Regular.woff │ ├── KaTeX_Size4-Regular.woff2 │ ├── KaTeX_Caligraphic-Bold.ttf │ ├── KaTeX_Caligraphic-Bold.woff │ ├── KaTeX_Fraktur-Regular.woff │ ├── KaTeX_Fraktur-Regular.woff2 │ ├── KaTeX_Main-BoldItalic.woff │ ├── KaTeX_Main-BoldItalic.woff2 │ ├── KaTeX_Math-BoldItalic.woff │ ├── KaTeX_Math-BoldItalic.woff2 │ ├── KaTeX_SansSerif-Bold.woff2 │ ├── KaTeX_SansSerif-Italic.ttf │ ├── KaTeX_SansSerif-Italic.woff │ ├── KaTeX_SansSerif-Regular.ttf │ ├── KaTeX_Script-Regular.woff2 │ ├── KaTeX_Caligraphic-Bold.woff2 │ ├── KaTeX_Caligraphic-Regular.ttf │ ├── KaTeX_Caligraphic-Regular.woff │ ├── KaTeX_SansSerif-Italic.woff2 │ ├── KaTeX_SansSerif-Regular.woff │ ├── KaTeX_SansSerif-Regular.woff2 │ ├── KaTeX_Typewriter-Regular.ttf │ ├── KaTeX_Typewriter-Regular.woff │ ├── KaTeX_Typewriter-Regular.woff2 │ └── KaTeX_Caligraphic-Regular.woff2 ├── contrib │ ├── copy-tex.min.css │ ├── copy-tex.css │ ├── mathtex-script-type.mjs │ ├── mathtex-script-type.min.js │ ├── copy-tex.min.js │ ├── copy-tex.mjs │ ├── auto-render.min.js │ └── mathtex-script-type.js └── README.md ├── scripts ├── reflow_count.py ├── checkXrefs ├── spec_tools │ ├── __init__.py │ ├── data_structures.py │ ├── util.py │ ├── algo.py │ ├── attributes.py │ └── file_process.py ├── __init__.py.docs ├── deperiodize_vuids.py ├── test_entity_db.py ├── globalizeIncludes ├── genanchorlinks.py ├── makemanaliases.py ├── htmldiff │ └── htmldiff ├── compImages.sh ├── indexExt.py ├── README.adoc ├── test_check_spec_links_api_specific.py └── check_spec_links.py ├── update_valid_usage_ids.sh ├── CODE_OF_CONDUCT.md ├── sandboxCopy ├── ChangeLog.txt ├── translate_math.js ├── makeAllExts ├── makeKHR ├── anspec.txt ├── appendices ├── volume_algorithm.txt ├── credits.txt ├── function_index.txt ├── changelog.txt └── extension_index.txt ├── installRelease ├── Copyright.txt ├── images ├── README.adoc └── anari_RGB_Mar20.svg ├── makeExt ├── .github └── workflows │ └── build-docs.yml ├── gen-script-docs.sh ├── README.adoc ├── xml ├── Makefile └── generate-core-block.rb ├── COPYING.md ├── chapters ├── object_types │ └── volumes.txt └── rendering_frames.txt ├── refPageNotes.md ├── style ├── vuid.txt └── misc.txt └── styleguide.txt /.gitignore: -------------------------------------------------------------------------------- 1 | _*/ 2 | *vscode* 3 | gen/* 4 | out/* 5 | anspec.html 6 | -------------------------------------------------------------------------------- /config/.gitignore: -------------------------------------------------------------------------------- 1 | /extDependency.py 2 | /extDependency.sh 3 | /extDependency.stamp 4 | -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /scripts/reflow_count.py: -------------------------------------------------------------------------------- 1 | # The value to start tagging VU statements at, unless overridden by -nextvu 2 | startVUID = 2994 3 | -------------------------------------------------------------------------------- /katex/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /katex/contrib/copy-tex.min.css: -------------------------------------------------------------------------------- 1 | .katex,.katex-display{user-select:all;-moz-user-select:all;-webkit-user-select:all;-ms-user-select:all} 2 | -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /katex/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/ANARI-Docs/HEAD/katex/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /update_valid_usage_ids.sh: -------------------------------------------------------------------------------- 1 | # This script updates the valid usage IDs in the specification 2 | # AsciiDoctor files. If a valid usage entry already contains 3 | # an ID, it skips that entry. If it does not contain an ID, 4 | # it will generate a new one. 5 | python3 reflow.py -overwrite -noflow -tagvu 6 | 7 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct ([https://www.khronos.org/developers/code-of-conduct](https://www.khronos.org/developers/code-of-conduct)), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil. 2 | -------------------------------------------------------------------------------- /katex/contrib/copy-tex.css: -------------------------------------------------------------------------------- 1 | /* Force selection of entire .katex/.katex-display blocks, so that we can 2 | * copy/paste the entire source code. If you omit this CSS, partial 3 | * selections of a formula will work, but will copy the ugly HTML 4 | * representation instead of the LaTeX source code. (Full selections will 5 | * still produce the LaTeX source code.) 6 | */ 7 | .katex, 8 | .katex-display { 9 | user-select: all; 10 | -moz-user-select: all; 11 | -webkit-user-select: all; 12 | -ms-user-select: all; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /sandboxCopy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | specdir=out 3 | RHOST=kaylee 4 | RPATH=/home/khronos/memberftp/vulkan/ 5 | 6 | cd $specdir || (echo "Can't cd to $specdir !" ; exit 1) 7 | # Create tarball and upload/copy/extract that to speed things 8 | echo "Creating tarball" 9 | tar czpf /tmp/tarball.tgz . 10 | echo "Uploading tarball" 11 | scp /tmp/tarball.tgz $RHOST:$RPATH 12 | echo "Extracting tarball on server" 13 | # Could add "&& rm tarball.tgz" but nice to have around 14 | ssh $RHOST "cd $RPATH && tar xzpf tarball.tgz" 15 | echo "Removing tarball" 16 | rm /tmp/tarball.tgz 17 | 18 | # scp -rp * $RHOST:$RPATH 19 | -------------------------------------------------------------------------------- /scripts/checkXrefs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # checkXrefs - check internal links in a Vulkan HTML spec 3 | # Usage: checkXrefs file.html 4 | # Prints a list of internal hrefs with no corresponding anchors. 5 | # (There are many anchors with no corresponding hrefs - this is OK). 6 | 7 | xrefs=`tempfile` 8 | ids=`tempfile` 9 | 10 | sed -e 's/ href="#/\nhref="#/g' < $1 | \ 11 | grep 'href="#' | \ 12 | sed -e 's/href="#//g' -e 's/"[ >].*//g' | \ 13 | sort | uniq > $xrefs 14 | sed -e 's/ id="/\nid="/g' < $1 | \ 15 | grep 'id="' | \ 16 | sed -e 's/id="//g' -e 's/"[ >].*//g' | \ 17 | sort | uniq > $ids 18 | 19 | comm -23 $xrefs $ids 20 | 21 | rm $xrefs $ids 1>&2 22 | -------------------------------------------------------------------------------- /ChangeLog.txt: -------------------------------------------------------------------------------- 1 | Update Log for the ANARI-Docs repository on Github. Updates are in reverse 2 | chronological order starting with the latest public release. 3 | 4 | This summarizes the periodic public updates, not individual commits. Updates 5 | on Github are done as single large patches at the release point, collecting 6 | together the resolution of many Khronos internal issues, along with any 7 | public pull requests that have been accepted. 8 | 9 | ----------------------------------------------------- 10 | 11 | Change log for ?? ??, 2020 ANARI 1.0.1 spec update: 12 | 13 | * Update release number to 1 for this update. 14 | 15 | Internal Issues: 16 | 17 | * Prototype of ANARI specification. 18 | -------------------------------------------------------------------------------- /config/asciidoctor-mathematical-ext.rb: -------------------------------------------------------------------------------- 1 | require 'asciidoctor/extensions' 2 | 3 | # This script makes [latexmath] blocks work within table cells. 4 | # See https://github.com/asciidoctor/asciidoctor-pdf/issues/740 5 | 6 | Asciidoctor::Extensions.register do 7 | treeprocessor do 8 | process do |doc| 9 | mathematicalProcessor = MathematicalTreeprocessor.new 10 | (table_blocks = doc.find_by context: :table).each do |table| 11 | (table.rows[:body] + table.rows[:foot]).each do |row| 12 | row.each do |cell| 13 | mathematicalProcessor.process cell.inner_document if cell.style == :asciidoc 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /scripts/spec_tools/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 -i 2 | # 3 | # Copyright (c) 2018-2019 Collabora, Ltd. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Author(s): Ryan Pavlik 18 | -------------------------------------------------------------------------------- /katex/contrib/mathtex-script-type.mjs: -------------------------------------------------------------------------------- 1 | import katex from '../katex.mjs'; 2 | 3 | let scripts = document.body.getElementsByTagName("script"); 4 | scripts = Array.prototype.slice.call(scripts); 5 | scripts.forEach(function (script) { 6 | if (!script.type || !script.type.match(/math\/tex/i)) { 7 | return -1; 8 | } 9 | 10 | const display = script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null; 11 | const katexElement = document.createElement(display ? "div" : "span"); 12 | katexElement.setAttribute("class", display ? "equation" : "inline-equation"); 13 | 14 | try { 15 | katex.render(script.text, katexElement, { 16 | displayMode: display 17 | }); 18 | } catch (err) { 19 | //console.error(err); linter doesn't like this 20 | katexElement.textContent = script.text; 21 | } 22 | 23 | script.parentNode.replaceChild(katexElement, script); 24 | }); 25 | -------------------------------------------------------------------------------- /config/vu-to-json.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016-2020 The Khronos Group Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | RUBY_ENGINE == 'opal' ? (require 'vu-to-json/extension') : (require_relative 'vu-to-json/extension') 16 | 17 | Extensions.register do 18 | preprocessor ValidUsageToJsonPreprocessor 19 | treeprocessor ValidUsageToJsonTreeprocessor 20 | end 21 | -------------------------------------------------------------------------------- /config/extension-highlighter.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016-2020 The Khronos Group Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | RUBY_ENGINE == 'opal' ? (require 'extension-highlighter/extension') : (require_relative 'extension-highlighter/extension') 16 | 17 | Extensions.register do 18 | preprocessor ExtensionHighlighterPreprocessor 19 | postprocessor AddHighlighterCSS 20 | end 21 | -------------------------------------------------------------------------------- /scripts/__init__.py.docs: -------------------------------------------------------------------------------- 1 | """Scripts for building the Vulkan specification and artifacts.""" 2 | 3 | # This is only used during doc builds, hence the weird file extension. 4 | # It messes up scripts at other times. 5 | 6 | # __all__ = [ 7 | # "cgenerator", 8 | # "check_spec_links", 9 | # "comment_convert", 10 | # "conventions", 11 | # "docgenerator", 12 | # "extensionmetadocgenerator", 13 | # "generator", 14 | # "genRef", 15 | # "genspec", 16 | # "genvk", 17 | # "hostsyncgenerator", 18 | # "indexExt", 19 | # "make_ext_dependency", 20 | # "pygenerator", 21 | # "reflib", 22 | # "reflow_count", 23 | # "reflow", 24 | # "reg", 25 | # "test_check_spec_links_api_specific", 26 | # "test_check_spec_links", 27 | # "test_entity_db", 28 | # "validitygenerator", 29 | # "vkapi", 30 | # "vkconventions", 31 | # "xml_consistency", 32 | # "spec_tools", 33 | # ] 34 | -------------------------------------------------------------------------------- /config/loadable_html.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016-2018 The Khronos Group Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | #require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' 16 | RUBY_ENGINE == 'opal' ? (require 'loadable_html/extension') : (require_relative 'loadable_html/extension') 17 | 18 | # All the inline macros we need 19 | Asciidoctor::Extensions.register do 20 | postprocessor MakeHtmlLoadable 21 | end 22 | -------------------------------------------------------------------------------- /config/katex_replace.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016-2020 The Khronos Group Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | #require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' 16 | RUBY_ENGINE == 'opal' ? (require 'katex_replace/extension') : (require_relative 'katex_replace/extension') 17 | 18 | # All the inline macros we need 19 | Asciidoctor::Extensions.register do 20 | postprocessor ReplaceMathjaxWithKatex 21 | end 22 | -------------------------------------------------------------------------------- /translate_math.js: -------------------------------------------------------------------------------- 1 | const katex = require("./katex/katex.js"); 2 | const fs = require("fs"); 3 | const escapeRegex = require("escape-string-regexp"); 4 | const he = require('he'); 5 | 6 | const filepath = process.argv[2]; 7 | 8 | var html = fs.readFileSync(filepath, "utf8"); 9 | 10 | const delimiters = [ 11 | //{ left: "$$", right: "$$", display: true}, 12 | { left: "\\[", right: "\\]", display: true}, 13 | //{ left: "$", right: "$", display: false}, 14 | { left: "\\(", right: "\\)", display: false} 15 | ] 16 | 17 | for( var delim of delimiters ) { 18 | const regex = new RegExp( escapeRegex(delim.left) + "([\\S\\s]*?)" + escapeRegex(delim.right), "g"); 19 | html = html.replace( regex, 20 | function(match, g1) { 21 | return katex.renderToString( he.decode(g1, {'strict': true}), {displayMode: delim.display, output: 'html', strict: true} ); 22 | } 23 | ); 24 | } 25 | 26 | fs.writeFileSync(filepath, html, 'utf8'); 27 | -------------------------------------------------------------------------------- /makeAllExts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright (c) 2016-2020 The Khronos Group Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # makeAllExts - invoke Makefile with the right options to build with all 18 | # extensions included. 19 | 20 | # Usage: makeAllExts targets 21 | 22 | # Load extension list, generated from vk.xml 23 | make config/extDependency.sh || exit 24 | source config/extDependency.sh 25 | 26 | make clean 27 | make EXTENSIONS="$allExts" APITITLE="(with all published extensions)" $* 28 | -------------------------------------------------------------------------------- /makeKHR: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright (c) 2016-2020 The Khronos Group Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # makeKHR - invoke Makefile with the right options to build with all 18 | # KHR extensions (but not KHX extensions) included. 19 | 20 | # Usage: makeKHR targets 21 | 22 | # Load extension list, generated from vk.xml 23 | make config/extDependency.sh || exit 24 | source config/extDependency.sh 25 | 26 | make clean 27 | make EXTENSIONS="$khrExts" APITITLE="(with all KHR extensions)" $* 28 | -------------------------------------------------------------------------------- /config/chunkindex/custom.patch: -------------------------------------------------------------------------------- 1 | --- vkspec.html 2018-08-26 12:27:18.567949774 +0100 2 | +++ vkspec.html 2018-08-26 13:19:36.665955764 +0100 3 | @@ -818,4 +818,7 @@ 4 | 5 | 6 | + 7 | + 8 | + 9 | 10 | 11 | @@ -848,4 +851,5 @@ 12 |
13 |
Table of Contents
14 | + 15 | 19 |
20 | + 21 | 22 |
23 | -------------------------------------------------------------------------------- /config/README.md: -------------------------------------------------------------------------------- 1 | # Vulkan Asciidoc Configuration Files 2 | 3 | ## Macros 4 | 5 | The macros in `spec-macros.rb` and `spec-macros/extension.rb` are 6 | described in the "Vulkan Documentation and Extensions: Procedures and 7 | Conventions" document (see the [styleguide](../styleguide.txt)). 8 | 9 | ## Support for Math 10 | 11 | Asciidoctor is customized to insert KaTeX ` 54 | ' 55 | 56 | output.sub! /(?=<\/head>)/, loaded_script 57 | output.sub! /(
18 | """Provides general-purpose data structures.""" 19 | 20 | 21 | class DictOfStringSets: 22 | """A dictionary where the values are sets of strings. 23 | 24 | Has some convenience functions to allow easier maintenance via 25 | the .add method.""" 26 | 27 | def __init__(self, d=None): 28 | self.d = {} 29 | if d: 30 | for k, v in d.items(): 31 | self.add(k, v) 32 | 33 | def __getitem__(self, k): 34 | return self.d[k] 35 | 36 | def __contains__(self, k): 37 | return k in self.d 38 | 39 | def get(self, k, default=None): 40 | return self.d.get(k, default) 41 | 42 | def get_dict(self): 43 | return self.d 44 | 45 | def items(self): 46 | """Return an iterator like dict().items().""" 47 | return self.d.items() 48 | 49 | def keys(self): 50 | """Return an iterator over keys.""" 51 | return self.d.keys() 52 | 53 | def values(self): 54 | """Return an iterator over values.""" 55 | return self.d.values() 56 | 57 | def add_key(self, k): 58 | """Ensure the set for the given key exists.""" 59 | if k not in self.d: 60 | self.d[k] = set() 61 | 62 | def add(self, k, v): 63 | self.add_key(k) 64 | if isinstance(v, str): 65 | v = (v, ) 66 | if not isinstance(v, set): 67 | v = set(v) 68 | self.d[k].update(v) 69 | -------------------------------------------------------------------------------- /katex/contrib/copy-tex.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(0);var r={inline:["$","$"],display:["$$","$$"]},o=function(e,t){void 0===t&&(t=r);for(var n=e.querySelectorAll(".katex-mathml + .katex-html"),o=0;o 2 | 3 | 5 | 8 | 9 | 10 | 12 | 14 | 15 | 16 | 18 | 19 | 21 | 27 | 28 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /.github/workflows/build-docs.yml: -------------------------------------------------------------------------------- 1 | name: ANARI-Docs CI 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [main, next_release] 6 | pull_request: 7 | branches: [main, next_release] 8 | jobs: 9 | build-docs: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - run: docker run --network=host --user ${uid}:${gid} --rm -v ${PWD}:/vulkan khronosgroup/docker-images@sha256:9f5add2758a383ba329bc8c4b819dea9fb695ee629b05b7da4739ddf81d39073 make -C /vulkan html pdf 14 | - name: Upload docs 15 | uses: actions/upload-artifact@v4 16 | with: 17 | name: ANARI-Docs 18 | path: | 19 | out/html 20 | out/pdf 21 | if-no-files-found: error 22 | update-doc-registry: 23 | runs-on: ubuntu-latest 24 | if: "${{ github.event_name == 'push' }}" 25 | needs: build-docs 26 | steps: 27 | - uses: actions/checkout@v4 28 | with: 29 | repository: ${{ github.repository_owner }}/ANARI-Registry.git 30 | ref: main 31 | token: ${{ secrets.ANARI_REGISTRY_TOKEN }} 32 | - uses: actions/download-artifact@v4 33 | id: artifacts 34 | with: 35 | name: ANARI-Docs 36 | path: _ANARI-Docs 37 | - run: | 38 | mkdir -p specs/1.1/ 39 | cp -f ${{ steps.artifacts.outputs.download-path }}/html/anspec.html specs/1.1/ANARI-1.1.html 40 | cp -f ${{ steps.artifacts.outputs.download-path }}/pdf/anspec.pdf specs/1.1/ANARI-1.1.pdf 41 | git stage specs/1.1/ANARI-1.1.html specs/1.1/ANARI-1.1.pdf 42 | if: "${{ github.ref == 'refs/heads/main' }}" 43 | - run: | 44 | mkdir -p specs/1.2-draft/ 45 | cp -f "${{ steps.artifacts.outputs.download-path }}/html/anspec.html" specs/1.2-draft/ANARI-1.2.html 46 | cp -f "${{ steps.artifacts.outputs.download-path }}/pdf/anspec.pdf" specs/1.2-draft/ANARI-1.2.pdf 47 | git stage specs/1.2-draft/ANARI-1.2.html specs/1.2-draft/ANARI-1.2.pdf 48 | if: "${{ github.ref == 'refs/heads/next_release' }}" 49 | - run: rm -fr "${{ steps.artifacts.outputs.download-path }}" 50 | - run: | 51 | git config --global user.name "ANARI-Docs" 52 | git config --global user.email "noreply@noreply" 53 | git commit -a -m "Update doc from ${{ github.ref }}" 54 | git push || : # ignore push errors, in case there is no change 55 | name: Pushing to ANARI-Registry 56 | -------------------------------------------------------------------------------- /appendices/function_index.txt: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Khronos Group Inc. 2 | // SPDX-License-Identifier: CC-BY-4.0 3 | 4 | [appendix] 5 | [[function_index]] 6 | == Function Index (Informative) 7 | 8 | * <> 9 | * <> 10 | * <> 11 | * <> 12 | * <> 13 | * <> 14 | * <> 15 | * <> 16 | * <> 17 | * <> 18 | * <> 19 | * <> 20 | * <> 21 | * <> 22 | * <> 23 | * <> 24 | * <> 25 | * <> 26 | * <> 27 | * <> 28 | * <> 29 | * <> 30 | * <> 31 | * <> 32 | * <> 33 | * <> 34 | * <> 35 | * <> 36 | * <> 37 | * <> 38 | * <> 39 | * <> 40 | * <> 41 | * <> 42 | * <> 43 | * <> 44 | * <> 45 | * <> 46 | * <> 47 | * <> 48 | * <> 49 | * <> 50 | * <> 51 | * <> 52 | * <> 53 | * <> 54 | * <> 55 | -------------------------------------------------------------------------------- /config/tilde_open_block.rb: -------------------------------------------------------------------------------- 1 | require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' 2 | 3 | include ::Asciidoctor 4 | 5 | module Asciidoctor 6 | 7 | # This addition to the parser class overrides the "is_delimited_block?" 8 | # method of the core parser, adding a new block delimiter of "~~~~" for open 9 | # blocks, which can be extended to an arbitrary number of braces to allow 10 | # nesting them, which is a limitation of the existing "only two dashes" 11 | # delimiter: https://github.com/asciidoctor/asciidoctor/issues/1121 12 | # The choice of tildes is based on comments in that bug. 13 | 14 | class Parser 15 | # Storing the original method so we can still call it from the overriding 16 | # version 17 | @OLD_is_delimited_block = method(:is_delimited_block?) 18 | 19 | # Logic here matches the original Parser#is_delimited_block? method, see 20 | # there for details of base implementation. 21 | def self.is_delimited_block? line, return_match_data = false 22 | # Quick check for a single brace character before forwarding to the 23 | # original parser method. 24 | if line[0] != '~' 25 | return @OLD_is_delimited_block.(line, return_match_data) 26 | else 27 | line_len = line.length 28 | if line_len <= 4 29 | tip = line 30 | tl = line_len 31 | else 32 | tip = line[0..3] 33 | tl = 4 34 | end 35 | 36 | # Hardcoded tilde delimiter, since that's the only thing this 37 | # function deals with. 38 | if tip == '~~~~' 39 | # tip is the full line when delimiter is minimum length 40 | if tl < 4 || tl == line_len 41 | if return_match_data 42 | context = :open 43 | masq = ['comment', 'example', 'literal', 'listing', 'pass', 'quote', 'sidebar', 'source', 'verse', 'admonition', 'abstract', 'partintro'].to_set 44 | BlockMatchData.new(context, masq, tip, tip) 45 | else 46 | true 47 | end 48 | elsif %(#{tip}#{tip[-1..-1] * (line_len - tl)}) == line 49 | if return_match_data 50 | context = :open 51 | masq = ['comment', 'example', 'literal', 'listing', 'pass', 'quote', 'sidebar', 'source', 'verse', 'admonition', 'abstract', 'partintro'].to_set 52 | BlockMatchData.new(context, masq, tip, line) 53 | else 54 | true 55 | end 56 | else 57 | nil 58 | end 59 | else 60 | nil 61 | end 62 | end 63 | end 64 | end 65 | 66 | end -------------------------------------------------------------------------------- /gen-script-docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2019-2020 The Khronos Group Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # SPDX-License-Identifier: Apache-2.0 17 | 18 | # Generate documentation for the python scripts in this repo, using pdoc3: 19 | # https://pdoc3.github.io/pdoc/ 20 | # 21 | # Output is under out/python-docs 22 | 23 | set -e 24 | 25 | # Pipe in some paths. We'll convert them to module names and document them. 26 | pathsToDocs() { 27 | grep -v "test_" | \ 28 | grep -v "__init__.py" | \ 29 | sed -e 's/[.]py//' -e 's:/:.:g' | \ 30 | xargs --verbose pdoc3 --html --force --output-dir $1 31 | } 32 | 33 | # Main body of script 34 | ( 35 | cd $(dirname $0) 36 | # Needed to complete the build - can't import genRef.py without it. 37 | make scripts/vkapi.py 38 | 39 | SPECDIR=$(pwd) 40 | OUTDIR=$(pwd)/out/python-docs 41 | INDEX=$OUTDIR/index.html 42 | mkdir -p $OUTDIR 43 | cp scripts/__init__.py.docs scripts/__init__.py 44 | export PYTHONPATH=${SPECDIR}/scripts 45 | ( 46 | # # scripts under specification 47 | cd $SPECDIR/scripts 48 | ls *.py 49 | 50 | # Generate the index files 51 | # echo "scripts" 52 | echo "scripts.spec_tools" 53 | 54 | ) | pathsToDocs $OUTDIR 55 | 56 | # Generate a simple index file, since generating one with pdoc3 chokes on the Retired directory. 57 | echo "

Python modules

    " > $INDEX 58 | ( 59 | cd $SPECDIR/scripts 60 | ls *.py 61 | ) | while read -r fn; do 62 | MODNAME=$(echo $fn | sed -r 's/([a-zA-Z_]+)([.]py)?/\1/') 63 | if [ -f $OUTDIR/$MODNAME.html ]; then 64 | # Only make non-dead links 65 | echo "
  • $MODNAME
  • " >> $INDEX 66 | fi 67 | done 68 | echo "
  • spec_tools
  • " >> $INDEX 69 | echo "
" >> $INDEX 70 | 71 | # Move index files to a more useful place 72 | rm -rf $OUTDIR/spec_tools 73 | mv $OUTDIR/scripts/spec_tools $OUTDIR/spec_tools 74 | # delete duplicate generated files 75 | rm -rf $OUTDIR/scripts 76 | 77 | rm -f scripts/__init__.py 78 | ) 79 | -------------------------------------------------------------------------------- /scripts/spec_tools/util.py: -------------------------------------------------------------------------------- 1 | """Utility functions not closely tied to other spec_tools types.""" 2 | # Copyright (c) 2018-2019 Collabora, Ltd. 3 | # Copyright (c) 2013-2020 The Khronos Group Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | def getElemName(elem, default=None): 19 | """Get the name associated with an element, either a name child or name attribute.""" 20 | name_elem = elem.find('name') 21 | if name_elem is not None: 22 | return name_elem.text 23 | # Fallback if there is no child. 24 | return elem.get('name', default) 25 | 26 | 27 | def getElemType(elem, default=None): 28 | """Get the type associated with an element, either a type child or type attribute.""" 29 | type_elem = elem.find('type') 30 | if type_elem is not None: 31 | return type_elem.text 32 | # Fallback if there is no child. 33 | return elem.get('type', default) 34 | 35 | 36 | def findFirstWithPredicate(collection, pred): 37 | """Return the first element that satisfies the predicate, or None if none exist. 38 | 39 | NOTE: Some places where this is used might be better served by changing to a dictionary. 40 | """ 41 | for elt in collection: 42 | if pred(elt): 43 | return elt 44 | return None 45 | 46 | 47 | def findNamedElem(elems, name): 48 | """Traverse a collection of elements with 'name' nodes or attributes, looking for and returning one with the right name. 49 | 50 | NOTE: Many places where this is used might be better served by changing to a dictionary. 51 | """ 52 | return findFirstWithPredicate(elems, lambda elem: getElemName(elem) == name) 53 | 54 | 55 | def findTypedElem(elems, typename): 56 | """Traverse a collection of elements with 'type' nodes or attributes, looking for and returning one with the right typename. 57 | 58 | NOTE: Many places where this is used might be better served by changing to a dictionary. 59 | """ 60 | return findFirstWithPredicate(elems, lambda elem: getElemType(elem) == typename) 61 | 62 | 63 | def findNamedObject(collection, name): 64 | """Traverse a collection of elements with 'name' attributes, looking for and returning one with the right name. 65 | 66 | NOTE: Many places where this is used might be better served by changing to a dictionary. 67 | """ 68 | return findFirstWithPredicate(collection, lambda elt: elt.name == name) 69 | -------------------------------------------------------------------------------- /config/katex_replace/extension.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016-2020 The Khronos Group Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' 16 | 17 | include ::Asciidoctor 18 | 19 | class ReplaceMathjaxWithKatex < Extensions::Postprocessor 20 | 21 | MathJaXScript = / 36 | 37 | 38 | 40 | 41 | ... 42 | 43 | ``` 44 | 45 | You can also [download KaTeX](https://github.com/KaTeX/KaTeX/releases) and host it yourself. 46 | 47 | For details on how to configure auto-render extension, refer to [the documentation](https://katex.org/docs/autorender.html). 48 | 49 | ### API 50 | 51 | Call `katex.render` to render a TeX expression directly into a DOM element. 52 | For example: 53 | 54 | ```js 55 | katex.render("c = \\pm\\sqrt{a^2 + b^2}", element, { 56 | throwOnError: false 57 | }); 58 | ``` 59 | 60 | Call `katex.renderToString` to generate an HTML string of the rendered math, 61 | e.g., for server-side rendering. For example: 62 | 63 | ```js 64 | var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}", { 65 | throwOnError: false 66 | }); 67 | // '...' 68 | ``` 69 | 70 | Make sure to include the CSS and font files in both cases. 71 | If you are doing all rendering on the server, there is no need to include the 72 | JavaScript on the client. 73 | 74 | The examples above use the `throwOnError: false` option, which renders invalid 75 | inputs as the TeX source code in red (by default), with the error message as 76 | hover text. For other available options, see the 77 | [API documentation](https://katex.org/docs/api.html), 78 | [options documentation](https://katex.org/docs/options.html), and 79 | [handling errors documentation](https://katex.org/docs/error.html). 80 | 81 | ## Demo and Documentation 82 | 83 | Learn more about using KaTeX [on the website](https://katex.org)! 84 | 85 | ## Contributing 86 | 87 | See [CONTRIBUTING.md](CONTRIBUTING.md) 88 | 89 | ## License 90 | 91 | KaTeX is licensed under the [MIT License](http://opensource.org/licenses/MIT). 92 | -------------------------------------------------------------------------------- /scripts/spec_tools/attributes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 -i 2 | # 3 | # Copyright (c) 2013-2020 The Khronos Group Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | """Utilities for working with attributes of the XML registry.""" 17 | 18 | import re 19 | 20 | _PARAM_REF_NAME_RE = re.compile( 21 | r"(?P[\w]+)(?P\[\])?(?P\.|::|->)?") 22 | 23 | 24 | def _split_param_ref(val): 25 | return [name for name, _, _ in _PARAM_REF_NAME_RE.findall(val)] 26 | 27 | 28 | def _human_readable_deref(val, make_param_name=None): 29 | """Turn the "name[].member[]" notation into plain English.""" 30 | parts = [] 31 | matches = _PARAM_REF_NAME_RE.findall(val) 32 | for name, brackets, delim in reversed(matches): 33 | if make_param_name: 34 | name = make_param_name(name) 35 | if delim: 36 | parts.append('member of') 37 | if brackets: 38 | parts.append('each element of') 39 | parts.append('the') 40 | parts.append(name) 41 | parts.append('parameter') 42 | return ' '.join(parts) 43 | 44 | 45 | class LengthEntry: 46 | """An entry in a (comma-separated) len attribute""" 47 | NULL_TERMINATED_STRING = 'null-terminated' 48 | MATH_STRING = 'latexmath:' 49 | 50 | def __init__(self, val): 51 | self.full_reference = val 52 | self.other_param_name = None 53 | self.null_terminated = False 54 | self.number = None 55 | self.math = None 56 | self.param_ref_parts = None 57 | if val == LengthEntry.NULL_TERMINATED_STRING: 58 | self.null_terminated = True 59 | return 60 | 61 | if val.startswith(LengthEntry.MATH_STRING): 62 | self.math = val.replace(LengthEntry.MATH_STRING, '')[1:-1] 63 | return 64 | 65 | if val.isdigit(): 66 | self.number = int(val) 67 | return 68 | 69 | # Must be another param name. 70 | self.param_ref_parts = _split_param_ref(val) 71 | self.other_param_name = self.param_ref_parts[0] 72 | 73 | def __str__(self): 74 | return self.full_reference 75 | 76 | def get_human_readable(self, make_param_name=None): 77 | assert(self.other_param_name) 78 | return _human_readable_deref(self.full_reference, make_param_name=make_param_name) 79 | 80 | def __repr__(self): 81 | "Formats an object for repr(), debugger display, etc." 82 | return 'spec_tools.attributes.LengthEntry("{}")'.format(self.full_reference) 83 | 84 | @staticmethod 85 | def parse_len_from_param(param): 86 | """Get a list of LengthEntry.""" 87 | len_str = param.get('len') 88 | if len_str is None: 89 | return None 90 | return [LengthEntry(elt) for elt in len_str.split(',')] 91 | 92 | 93 | class ExternSyncEntry: 94 | """An entry in a (comma-separated) externsync attribute""" 95 | 96 | TRUE_STRING = 'true' 97 | TRUE_WITH_CHILDREN_STRING = 'true_with_children' 98 | 99 | def __init__(self, val): 100 | self.full_reference = val 101 | self.entirely_extern_sync = (val in (ExternSyncEntry.TRUE_STRING, ExternSyncEntry.TRUE_WITH_CHILDREN_STRING)) 102 | self.children_extern_sync = (val == ExternSyncEntry.TRUE_WITH_CHILDREN_STRING) 103 | if self.entirely_extern_sync: 104 | return 105 | 106 | self.param_ref_parts = _split_param_ref(val) 107 | self.member = self.param_ref_parts[0] 108 | 109 | def get_human_readable(self, make_param_name=None): 110 | assert(not self.entirely_extern_sync) 111 | return _human_readable_deref(self.full_reference, make_param_name=make_param_name) 112 | 113 | @staticmethod 114 | def parse_externsync_from_param(param): 115 | """Get a list of ExternSyncEntry.""" 116 | sync_str = param.get('externsync') 117 | if sync_str is None: 118 | return None 119 | return [ExternSyncEntry(elt) for elt in sync_str.split(',')] 120 | 121 | def __repr__(self): 122 | "Formats an object for repr(), debugger display, etc." 123 | return 'spec_tools.attributes.ExternSyncEntry("{}")'.format(self.full_reference) 124 | 125 | -------------------------------------------------------------------------------- /refPageNotes.md: -------------------------------------------------------------------------------- 1 | # Notes on automatic reference page generation 2 | 3 | Main takeaway point: ref page generation from the spec sources is ready to 4 | go. It can be tweaked in lots of small ways, but as it stands it's a huge 5 | improvement over the current ref pages and should be adopted ASAP. 6 | 7 | ## Approach 8 | 9 | This is done with some Python scripts that rely on the rigid structure 10 | we've enforced on command and structure definitions in the spec. Everything 11 | from the paragraph *preceding* the protos/structs include:: through the 12 | validity:: include is pulled out and then split up into ref page sections. 13 | In some cases, it isn't immediately obvious how to reorder to get all the 14 | content relevant to a single command or struct blocked together in this 15 | fashion, and some simplistic semantic tagging has been added for those cases 16 | where the structural organization isn't appropriate. 17 | 18 | The changes to the spec are straightforward, though they appear large in 19 | some places. What's happening is: 20 | 21 | * Validity includes are moved below all the relevant text. 22 | * Structure definitions are moved after the validity includes for 23 | commands, so they don't overlap or imbed. This has been done for 24 | enumerant definitions in some cases, but those are harder to unwind. 25 | * Blank lines are being removed from parameter / member definition bullet 26 | lists, so they don't confuse the extraction script. 27 | * Annotations in the form of asciidoc comments were added where 28 | they were needed to assist the extraction scripts. These look 29 | like 30 |
// refBegin vkSomething short description of command for ref page title 31 |
// refEnd vkSomething [list of related ref pages] 32 | * A bunch of small consistency edits were done to match the style guide. 33 | These (mostly) aren't directly related to the extraction process, but it 34 | is an opportune time to do them. 35 | * Pages that don't have extractable descriptive text in the specification, 36 | such as Vk*Flags and some Vk*FlagBits types, get automatically generated 37 | ref pages. These just define the interface and link to other pages using 38 | that type. 39 | 40 | ## Things to be done 41 | 42 | These are (more or less) in decreasing priority order. Few of them are 43 | difficult. 44 | 45 | * Something is messed up with the individual page generation targets in 46 | the Makefile, so the genRef.py action isn't a dependency of 47 | $(MANSOURCES) yet. See 48 | https://www.cmcrossroads.com/article/rules-multiple-outputs-gnu-make?page=0%2C2 49 | * Cross-page macro links are broken in the individual ref pages, due to 50 | using the wrong macros, but are OK in the single-page apispec.html. 51 | Should be easily fixed. 52 | * manpdf (single-page PDF ref document) target is currently broken. 53 | * Turn handle references from sname: to slink: so they link to the right 54 | place. Consider using an hlink/hname macro instead. Similarly for 55 | basetype: (which doesn't link, but could now with blink:/btext:). In 56 | general, most of the ?name: macros can and should turn into ?link:, 57 | aside from those directly in the section describing that name. 58 | * Need to tweak asciidoc macros for man pages (manpages.conf). 59 | * "See Also" links are automatically generated based on the type 60 | dependencies between pages. This works well, but doesn't include logical 61 | groupings (all clear commands, all drawing commands, etc.). These can be 62 | added to the explicit crosslinks in // refEnd statements if desired. 63 | * Remove autogenerated files from git and enhance the Makefiles to do all 64 | the scripting work required to generate the ref page sources, vkapi.py, 65 | etc. at build time. 66 | * Some problems with a2x not finding NOTE icons from the asciidoc 67 | distribution (worked around by copying into the man/images directory, 68 | for now). It would sure be nice if the build were smart enough to use 69 | the icons distributed with asciidoc, instead of needing separate copies. 70 | * I'm not sure how to best deal with KHR extension ref pages. We could 71 | generate them separately in their branches and combine with core pages, 72 | or generate everything in the wsi_extensions branch - but that will 73 | leave us with core ref pages including WSI extension material, without 74 | any obvious indication of why or where. Changes for the KHR extension 75 | branches will be small once the 1.0 changes are merged in, and I'll 76 | undertake to do those once the core changes are accepted. 77 | * Cross-page asciidoc links are broken. This is hard to fix. Probably the 78 | best thing to do is strip \<\<\>\> links from the source, or perhaps 79 | generate an HTML link to the live spec. 80 | * VkResult page needs a better "See Also" section - but not the full list 81 | of functions returning VkResult. 82 | * Short descriptions are currently embedded in the spec source, and are 83 | missing in some cases. Would it make more sense to add them to vk.xml? 84 | -------------------------------------------------------------------------------- /scripts/spec_tools/file_process.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # 3 | # Copyright (c) 2018-2019 Collabora, Ltd. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Author(s): Ryan Pavlik 18 | "Utilities for processing files." 19 | 20 | from pathlib import Path 21 | 22 | 23 | class LinewiseFileProcessor: 24 | """A base class for code that processes an input file (or file handle) one line at a time.""" 25 | 26 | def __init__(self): 27 | self._lines = [] 28 | self._line_num = 0 29 | self._next_line = None 30 | self._line = '' 31 | self._filename = Path() 32 | 33 | @property 34 | def filename(self): 35 | """The Path object of the currently processed file""" 36 | return self._filename 37 | 38 | @property 39 | def relative_filename(self): 40 | """The current file's Path relative to the current working directory""" 41 | return self.filename.relative_to(Path('.').resolve()) 42 | 43 | @property 44 | def line(self): 45 | """The current line, including any trailing whitespace and the line ending.""" 46 | return self._line 47 | 48 | @property 49 | def line_number(self): 50 | """Get 1-indexed line number.""" 51 | return self._line_num 52 | 53 | @property 54 | def line_rstripped(self): 55 | """The current line without any trailing whitespace.""" 56 | if self.line is None: 57 | return None 58 | return self.line.rstrip() 59 | 60 | @property 61 | def trailing_whitespace(self): 62 | """The trailing whitespace of the current line that gets removed when accessing rstrippedLine""" 63 | non_whitespace_length = len(self.line_rstripped) 64 | return self.line[non_whitespace_length:] 65 | 66 | @property 67 | def next_line(self): 68 | """Peek at the next line, if any.""" 69 | return self._next_line 70 | 71 | @property 72 | def next_line_rstripped(self): 73 | """Peek at the next line, if any, without any trailing whitespace.""" 74 | if self.next_line is None: 75 | return None 76 | return self.next_line.rstrip() 77 | 78 | def get_preceding_line(self, relative_index=-1): 79 | """Retrieve the line at an line number at the given relative index, if one exists. Returns None if there is no line there.""" 80 | if relative_index >= 0: 81 | raise RuntimeError( 82 | 'relativeIndex must be negative, to retrieve a preceding line.') 83 | if relative_index + self.line_number <= 0: 84 | # There is no line at this index 85 | return None 86 | return self._lines[self.line_number + relative_index - 1] 87 | 88 | def get_preceding_lines(self, num): 89 | """Get *up to* the preceding num lines. Fewer may be returned if the requested number aren't available.""" 90 | return self._lines[- (num + 1):-1] 91 | 92 | def process_line(self, line_num, line): 93 | """Implement in your subclass to handle each new line.""" 94 | raise NotImplementedError 95 | 96 | def _process_file_handle(self, file_handle): 97 | # These are so we can process one line earlier than we're actually iterating thru. 98 | processing_line_num = None 99 | processing_line = None 100 | 101 | def do_process_line(): 102 | self._line_num = processing_line_num 103 | self._line = processing_line 104 | if processing_line is not None: 105 | self._lines.append(processing_line) 106 | self.process_line(processing_line_num, processing_line) 107 | 108 | for line_num, line in enumerate(file_handle, 1): 109 | self._next_line = line 110 | do_process_line() 111 | processing_line_num = line_num 112 | processing_line = line 113 | 114 | # Finally process the left-over line 115 | self._next_line = None 116 | do_process_line() 117 | 118 | def process_file(self, filename, file_handle=None): 119 | """Main entry point - call with a filename and optionally the file handle to read from.""" 120 | if isinstance(filename, str): 121 | filename = Path(filename).resolve() 122 | 123 | self._filename = filename 124 | 125 | if file_handle: 126 | self._process_file_handle(file_handle) 127 | else: 128 | with self._filename.open('r', encoding='utf-8') as f: 129 | self._process_file_handle(f) 130 | -------------------------------------------------------------------------------- /style/vuid.txt: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 The Khronos Group Inc. 2 | // SPDX-License-Identifier: CC-BY-4.0 3 | 4 | [appendix] 5 | [[appendix-vuid]] 6 | = Valid Usage ID Tags 7 | 8 | Valid usage statements in the published Vulkan Specification must all be 9 | given _Valid Usage ID_ or _VUID_ tags. 10 | These tags are asciidoctor anchors, intended for use by the validation layer 11 | to provide unique names for each validation condition, and a way to link 12 | from validation layer reports into the corresponding parts of the 13 | Specification. 14 | 15 | 16 | [[appendix-vuid-format]] 17 | == Format of VUID Tags 18 | 19 | For implicit valid usage statements, the tags are formatted like this: 20 | 21 | [source,asciidoc] 22 | ---- 23 | [[VUID-blockname-paramname-category]] 24 | ---- 25 | 26 | _blockname_ is the name of the function or structure for which a valid usage 27 | statement is being generated. 28 | 29 | _paramname_ is the name of the parameter being validated. 30 | In some cases, the statement does not validate a single parameter and this 31 | portion of the tag is absent. 32 | 33 | _category_ is the type of statement being generated. 34 | There are over one dozen types referring to distinct conditions such as 35 | valid objects, required bitmasks, required array lengths, constraints on 36 | parent objects, and so on. 37 | 38 | For explicit valid usage statements, the tags are formatted like this: 39 | 40 | [source,asciidoc] 41 | ---- 42 | [[VUID-blockname-paramname-number]] 43 | ---- 44 | 45 | _blockname_ is the name of the function or structure for which a valid usage 46 | statement is being generated. 47 | 48 | _paramname_ is the name of the parameter being validated. 49 | In some cases, the statement does not validate a single parameter and this 50 | portion of the tag is replaced by `-None-` 51 | 52 | _number_ is a unique five digit, zero-filled number used to disambiguate 53 | similar tag names. 54 | 55 | [NOTE] 56 | .Note 57 | ==== 58 | The _blockname_, _paramname_, and _category_ portions of a VUID tag name 59 | must each be composed only of the alphanumeric characters A-Z, a-z, and 0-9, 60 | and the ':' character. 61 | In general only the alphabetic subset of these characters is used, but there 62 | are a few exceptions. 63 | ==== 64 | 65 | 66 | [[appendix-vuid-creating]] 67 | == Creating VUID Tags 68 | 69 | For implicit valid usage statements generated automatically from `vk.xml`, 70 | VUID tags are created automatically by the generator scripts. 71 | 72 | For explicit valid usage statements, VUID tags are generated by passing 73 | appropriate options to the script `reflow.py`. 74 | 75 | Since these tags are of use only to the published validation layer, they are 76 | needed only in the published Specification sources and outputs. 77 | Therefore, authors of extensions, or other branches adding valid usage 78 | statements, are not themselves responsible for adding tags in their 79 | branches. 80 | The specification editors will take care of this as part of the process of 81 | publishing updates. 82 | For reference purposes, this process is described below: 83 | 84 | First, after integrating all new specification language into the internal 85 | gitlab `master` branch which contains the canonical Specification source, 86 | invoke the following command: 87 | 88 | [source,sh] 89 | ---- 90 | python3 reflow.py -overwrite -noflow -tagvu chapters/*.txt chapters/*/*.txt 91 | ---- 92 | 93 | This will add VUID tags to all statements in valid usage blocks which don't 94 | already have them. 95 | Some diagnostics will be reported, but these are do not in general require 96 | any action. 97 | 98 | After updating all files, the script will update a file containing the next 99 | free numeric VUID. 100 | 101 | Commit the updated source files and `reflow.py` together. 102 | The next time the script is run, VUID tags will be assigned numbers starting 103 | from the current startVUID value. 104 | 105 | [NOTE] 106 | .Note 107 | ==== 108 | For in-development Vulkan extensions, the VUID assignment script may also be 109 | run in the internal `devel` branch. 110 | However, this may only be done after VUIDs are assigned to all valid usage 111 | statements in `master` branch and `devel` is synced up with `master`, so 112 | that only the valid usage statements found only in `devel` are assigned 113 | VUIDs in that branch. 114 | ==== 115 | 116 | 117 | == Updating VUID Tags When Valid Usage Statements Change 118 | 119 | Valid usage statements have corresponding tests in the Vulkan Validation 120 | Layer. 121 | The tests must be changed in response to semantic changes in the VU 122 | statements, whether for bug-fixing, adding extension interactions, or 123 | otherwise. 124 | The rule used when updating explicit VU statements is that the merge request 125 | or pull request responsible for making the change must remove the existing 126 | VUID tag, so that a new one can be assigned, _except_ in the following 127 | cases: 128 | 129 | * The changes are non-semantic, such as using consistent phrasing or 130 | markup. 131 | * The changes consist of changing `KHX` to `KHR` suffixes when promoting a 132 | Khronos-defined extension. 133 | 134 | [NOTE] 135 | .Note 136 | ==== 137 | This section may need further modification in response to guidelines agreed 138 | to by the Vulkan Working Group. 139 | ==== 140 | -------------------------------------------------------------------------------- /style/misc.txt: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 The Khronos Group Inc. 2 | // SPDX-License-Identifier: CC-BY-4.0 3 | 4 | [[miscellaneous]] 5 | = Image Authoring, Formats, and Style 6 | 7 | Images used in the ANARI documents must be kept in the directory `images/` 8 | in SVG format. 9 | 10 | Images should be authored in the open-source 11 | https://inkscape.org/[`Inkscape`] tool, downloadable from its website or 12 | packaged as an optional install for most Linux distributions. 13 | This allows other people to easily edit your images in the future. 14 | Also, while SVG is in principle a portable image format, some proprietary 15 | image editors have been observed to produce images incompatible with the PDF 16 | image pipeline used by the Specification. 17 | 18 | Images must be authored at their actual image size in the HTML and PDF 19 | output documents, and must not be scaled with asciidoctor options. 20 | In most cases, images are included as standalone figures and should occupy 21 | the full width of the document - don't leave unnecessary whitespace on 22 | either side of the image. 23 | 24 | The PDF output has an available width of just over 660px (at the default 25 | 96dpi), and a height somewhere around 1000px (which diagrams should really 26 | go nowhere near anyway). 27 | The html output is wider (800 pixels) and with practically unlimited height. 28 | As the PDF dimensions are more restrictive, images should not exceed these 29 | limits. 30 | 31 | [NOTE] 32 | .Note 33 | ==== 34 | According to the documentation available, the PDF output *should* have 35 | dimensions of roughly 184mm x 271mm - or equivalently 697px x 1026px (A4 36 | size [asciidoctor default] with a 0.5in margin [prawn-pdf default] on each 37 | side). 38 | However for reasons currently unknown, at least the available width before 39 | images are scaled down lies is about 30-something pixels lower than that; 40 | the height where this happens hasn't been measured, but is likely to 41 | similarly be lower than it should be for reasons currently unknown. 42 | ==== 43 | 44 | Dimensions of elements in the SVG file should be authored in pixels (`px`) 45 | such that lines/strokes are not unnecessarily anti-aliased (e.g. usually 46 | stick to integer pixel widths for lines). 47 | In many cases it is useful to also set the background grid to px, but it not 48 | necessary; Inkscape has reliable conversions between px and mm using a 49 | default dpi of 96 (which matches the PDF output), so the output dimension is 50 | mostly irrelevant. 51 | 52 | Text in images should usually appear at 12 point type so as to match that in 53 | the body of the specification, though 10 point text can be used sparingly 54 | where necessary (however this is often indicative of the diagram being too 55 | cramped, so authors should consider scaling or reworking the diagram 56 | instead). 57 | Text should use the built-in generic sans serif font so as to ensure the 58 | font in the output document matches whatever sans serif font is used for 59 | that document. 60 | Note that the character set is currently <>. 62 | 63 | The font and color scheme used for existing images (black, red, and 50% 64 | gray) should be used for changes and new images whenever reasonable to do 65 | so, to preserve a consistent look and feel. 66 | Whilst a white background is typically assumed, explicitly adding white as a 67 | color should be avoided - instead leave elements transparent so the diagrams 68 | can be used in other documents. 69 | 70 | Many other elements are consistent throughout the set of diagrams which 71 | should be maintained in new diagrams where possible. 72 | Examples include: 73 | 74 | * Lines are usually either fully solid, or use a consistent, and 75 | relatively spacious, dash style. 76 | * Lines are capped with a consistent arrow shape where relevant. 77 | * Small solid circles representing points are a consistently sized circle. 78 | 79 | Whenever reasonable, it is advised to copy an existing similar diagram and 80 | edit it rather than creating one from scratch in order to re-use elements 81 | and maintain consistency. 82 | 83 | 84 | [[character-sets-in-svg]] 85 | == Character sets in SVG files 86 | 87 | At the moment, the PDF conversion path only supports the Windows-1252 88 | character set, as we are currently using the standard fonts built into every 89 | PDF viewer - such that we don't have to embed a different font. 90 | Unfortunately these only support Windows-1252, which is a highly limited 91 | character set. 92 | 93 | As such, characters not in that set will not display properly when present 94 | in an SVG, and will fire a warning when building the PDF. 95 | Luckily, Inkscape has an "Object to path" function built in, which will 96 | convert text to a raw path, allowing these characters to be supported. 97 | 98 | Please ensure that you build the PDF before submitting any new images, 99 | particularly with non-standard characters, in order to catch such errors. 100 | 101 | 102 | ifdef::editing-notes[] 103 | [NOTE] 104 | .editing-note 105 | ==== 106 | *Other Stuff Which May Be Described In This Chapter Eventually* 107 | 108 | * Something about Image formats 109 | * Something about validation scripts 110 | * Glossary lists 111 | * New param/enum macros 112 | ==== 113 | endif::editing-notes[] 114 | 115 | -------------------------------------------------------------------------------- /config/chunkindex/chunked.js: -------------------------------------------------------------------------------- 1 | /*! loadJS: load a JS file asynchronously. [c]2014 @scottjehl, Filament Group, Inc. (Based on http://goo.gl/REQGQ by Paul Irish). Licensed MIT */ 2 | (function( w ){ 3 | var loadJS = function( src, cb, ordered ){ 4 | "use strict"; 5 | var tmp; 6 | var ref = w.document.getElementsByTagName( "script" )[ 0 ]; 7 | var script = w.document.createElement( "script" ); 8 | 9 | if (typeof(cb) === 'boolean') { 10 | tmp = ordered; 11 | ordered = cb; 12 | cb = tmp; 13 | } 14 | 15 | script.src = src; 16 | script.async = !ordered; 17 | ref.parentNode.insertBefore( script, ref ); 18 | 19 | if (cb && typeof(cb) === "function") { 20 | script.onload = cb; 21 | } 22 | return script; 23 | }; 24 | // commonjs 25 | if( typeof module !== "undefined" ){ 26 | module.exports = loadJS; 27 | } 28 | else { 29 | w.loadJS = loadJS; 30 | } 31 | }( typeof global !== "undefined" ? global : this )); 32 | /*! end loadJS */ 33 | 34 | // Remaining portions of this file are 35 | // 36 | // Copyright (c) 2019 Baldur Karlsson 37 | // 38 | // Licensed under the Apache License, Version 2.0 (the "License"); 39 | // you may not use this file except in compliance with the License. 40 | // You may obtain a copy of the License at 41 | // 42 | // http://www.apache.org/licenses/LICENSE-2.0 43 | 44 | var searchengine = undefined; 45 | 46 | // scroll to the first linking to a chapter 47 | function scrollChapter(element, chapter) { 48 | for(var i=0; i < element.children.length; i++) { 49 | if(element.children[i].nodeName == "A" && element.children[i].href.indexOf(chapter) >= 0) { 50 | element.children[i].scrollIntoView(true); 51 | return true; 52 | } 53 | 54 | if(scrollChapter(element.children[i], chapter)) 55 | return true; 56 | } 57 | 58 | return false; 59 | } 60 | 61 | var results = undefined; 62 | var searchbox = undefined; 63 | var searchTimeout = undefined; 64 | 65 | function clearSearch() { 66 | while(results.children.length > 0) { 67 | results.removeChild(results.children[0]); 68 | } 69 | 70 | document.getElementById("resultsdiv").classList.remove("results"); 71 | } 72 | 73 | function doSearch() { 74 | clearSearch(); 75 | 76 | var searchtext = searchbox.value; 77 | 78 | if(searchtext == '') 79 | return; 80 | 81 | if(searchtext.indexOf(' ') == -1 && searchtext.indexOf('\t') == -1 && searchtext.indexOf('"') == -1) 82 | searchtext = searchtext + ' ' + searchtext + '*'; 83 | 84 | searchtext = searchtext.replace(/"/g, '') 85 | 86 | var searchresults = searchengine.search(searchtext); 87 | 88 | if(searchresults.length == 0) { 89 | var r = document.createElement('LI'); 90 | r.innerHTML = 'No results'; 91 | 92 | results.appendChild(r); 93 | } 94 | 95 | document.getElementById("resultsdiv").classList.add("results"); 96 | 97 | for(var i=0; i < 10 && i < searchresults.length; i++) { 98 | var a = document.createElement('A'); 99 | a.setAttribute('href', searchresults[i].ref); 100 | a.innerHTML = searchlookup[searchresults[i].ref]; 101 | 102 | var r = document.createElement('LI'); 103 | r.appendChild(a); 104 | 105 | results.appendChild(r); 106 | } 107 | } 108 | 109 | function searchInput(e) { 110 | if(searchTimeout !== undefined) 111 | clearTimeout(searchTimeout); 112 | 113 | searchTimeout = setTimeout(doSearch, 50); 114 | } 115 | 116 | function searchKeyDown(e) { 117 | if(e.keyCode == 27) { 118 | // escape 119 | if(searchTimeout !== undefined) 120 | clearTimeout(searchTimeout); 121 | 122 | searchbox.value = ''; 123 | 124 | clearSearch(); 125 | } else if(e.keyCode == 10 || e.keyCode == 13) { 126 | // enter/return 127 | doSearch(); 128 | } else if(e.keyCode == 8) { 129 | clearSearch(); 130 | 131 | searchInput(e); 132 | } 133 | } 134 | 135 | document.addEventListener("DOMContentLoaded", function(event) { 136 | // get the chapter name from the current URL 137 | var chap = window.location.pathname.replace(/.*\//, ''); 138 | 139 | var toc = document.getElementById("toc"); 140 | 141 | // Scroll the sidebar to the appropriate chapter 142 | if(chap != "") { 143 | scrollChapter(toc, chap); 144 | toc.scrollTop -= 96; 145 | } 146 | 147 | // add anchor links to code blocks 148 | var blocks = document.getElementsByClassName("listingblock") 149 | 150 | for(var i=0; i < blocks.length; i++) { 151 | if(blocks[i].id.length > 0) { 152 | var a = document.createElement("A"); 153 | a.innerHTML = '\u00B6'; 154 | a.setAttribute('class', 'link'); 155 | a.setAttribute('href', '#' + blocks[i].id); 156 | 157 | blocks[i].insertBefore(a, blocks[i].childNodes[0]); 158 | } 159 | } 160 | 161 | results = document.getElementById('results'); 162 | searchbox = document.getElementById('searchbox'); 163 | 164 | loadJS("lunr.js", function() { 165 | loadJS(searchindexurl, function() { 166 | searchengine = lunr.Index.load(searchindex); 167 | 168 | searchbox.value = ''; 169 | searchbox.disabled = false; 170 | searchbox.addEventListener('keydown', searchKeyDown, false); 171 | searchbox.addEventListener('input', searchInput, false); 172 | }, true); 173 | }, true); 174 | }); 175 | -------------------------------------------------------------------------------- /scripts/test_check_spec_links_api_specific.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # 3 | # Copyright (c) 2018-2019 Collabora, Ltd. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Author(s): Ryan Pavlik 18 | # 19 | # Purpose: This file contains tests for check_spec_links.py 20 | # that depend on the API being used. 21 | 22 | import pytest 23 | 24 | from check_spec_links import MacroChecker, MessageId, makeMacroChecker 25 | from spec_tools.console_printer import ConsolePrinter 26 | from spec_tools.macro_checker_file import shouldEntityBeText 27 | from test_check_spec_links import (CheckerWrapper, allMessages, 28 | loneMsgReplacement, message, msgReplacement) 29 | 30 | 31 | @pytest.fixture 32 | def ckr(capsys): 33 | """Fixture - add an arg named ckr to your test function to automatically get one passed to you.""" 34 | return CheckerWrapper(capsys) 35 | 36 | 37 | def test_vulkan_refpage_mismatch(ckr): 38 | """Vulkan-specific tests of the REFPAGE_MISMATCH message.""" 39 | ckr.enabled([MessageId.REFPAGE_MISMATCH]) 40 | # Should error: this is actually a mismatch in Vulkan 41 | assert(ckr.check( 42 | """[open,refpage='VkQueueFlags'] 43 | -- 44 | include::{generated}/api/enums/VkQueueFlagBits.txt[]""").numDiagnostics() == 1) 45 | assert(ckr.check( 46 | """[open,refpage='VkQueueFlags'] 47 | -- 48 | include::{generated}/validity/enums/VkQueueFlagBits.txt[]""").numDiagnostics() == 1) 49 | 50 | # Should not error: this is just an alias 51 | assert(ckr.check( 52 | """[open,refpage='vkUpdateDescriptorSetWithTemplate'] 53 | -- 54 | include::{generated}/api/protos/vkUpdateDescriptorSetWithTemplateKHR.txt[]""").numDiagnostics() == 0) 55 | 56 | 57 | def test_vulkan_refpage_missing(ckr): 58 | """Vulkan-specific tests of the REFPAGE_MISSING message.""" 59 | ckr.enabled([MessageId.REFPAGE_MISSING]) 60 | 61 | # Should error: flags are expected to have their own ref page. 62 | assert(ckr.check( 63 | "include::{generated}/api/flags/VkQueueFlags.txt[]").numDiagnostics() == 1) 64 | 65 | 66 | def test_vulkan_refpage_block(ckr): 67 | """Vulkan-specific tests of the REFPAGE_BLOCK message.""" 68 | ckr.enabled([MessageId.REFPAGE_BLOCK]) 69 | 70 | # Should have no errors: Non-refpage usage of '--' is acceptable 71 | assert(not ckr.check( 72 | """-- 73 | bla 74 | --""").messages) 75 | 76 | # Should have 1 error: 77 | # - line after tag isn't '--' 78 | result = ckr.check( 79 | """-- 80 | [open,] 81 | bla 82 | --""") 83 | assert(result.numDiagnostics() == 1) 84 | # Internally, it's as if the following were the spec source, after putting in the "fake" lines 85 | # (each of the added lines comes from one message): 86 | # 87 | # -- 88 | # [open,] 89 | # -- 90 | # bla 91 | # -- 92 | assert("but did not find, a line containing only -- following a reference page tag" in message(result)) 93 | 94 | 95 | def test_vulkan_legacy(ckr): 96 | """Test the LEGACY message which is Vulkan-only.""" 97 | ckr.enabled([MessageId.LEGACY]) 98 | # Should complain about LEGACY 99 | assert(ckr.check('sname:VkDeviceMemory').numDiagnostics() == 1) 100 | 101 | 102 | def test_vulkan_alias(ckr): 103 | """Tests of the aliasing data structure, dependent on Vulkan-specific registry.""" 104 | entity_db = ckr.ckr.entity_db 105 | 106 | assert(entity_db.areAliases( 107 | 'VkCommandPoolTrimFlagsKHR', 'VkCommandPoolTrimFlags')) 108 | # Try one reversed-order, though the assert in that method should fire if this is wrong. 109 | assert(entity_db.areAliases( 110 | 'VkCommandPoolTrimFlags', 'VkCommandPoolTrimFlagsKHR')) 111 | 112 | assert(entity_db.areAliases( 113 | 'VkDescriptorUpdateTemplateKHR', 'VkDescriptorUpdateTemplate')) 114 | assert(entity_db.areAliases('VkDescriptorUpdateTemplateTypeKHR', 115 | 'VkDescriptorUpdateTemplateType')) 116 | assert(entity_db.areAliases('VkQueueFamilyProperties2KHR', 117 | 'VkQueueFamilyProperties2')) 118 | assert(entity_db.areAliases('VK_COLORSPACE_SRGB_NONLINEAR_KHR', 119 | 'VK_COLOR_SPACE_SRGB_NONLINEAR_KHR')) 120 | assert(entity_db.areAliases('vkEnumeratePhysicalDeviceGroupsKHR', 121 | 'vkEnumeratePhysicalDeviceGroups')) 122 | assert(entity_db.areAliases( 123 | 'vkCmdDrawIndirectCountAMD', 'vkCmdDrawIndirectCountKHR')) 124 | assert(entity_db.areAliases('VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT', 125 | 'VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT')) 126 | 127 | assert(entity_db.areAliases('VK_LUID_SIZE_KHR', 'VK_LUID_SIZE')) 128 | 129 | def test_vulkan_entity_detection(ckr): 130 | ckr.enabled([MessageId.BAD_ENTITY]) 131 | # Should complain about BAD_ENTITY even though it's sname 132 | assert(ckr.check('sname:VkInstanceCreateInfoBOGUS').numDiagnostics() == 1) 133 | -------------------------------------------------------------------------------- /katex/contrib/mathtex-script-type.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(require("katex")); 4 | else if(typeof define === 'function' && define.amd) 5 | define(["katex"], factory); 6 | else { 7 | var a = typeof exports === 'object' ? factory(require("katex")) : factory(root["katex"]); 8 | for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; 9 | } 10 | })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__0__) { 11 | return /******/ (function(modules) { // webpackBootstrap 12 | /******/ // The module cache 13 | /******/ var installedModules = {}; 14 | /******/ 15 | /******/ // The require function 16 | /******/ function __webpack_require__(moduleId) { 17 | /******/ 18 | /******/ // Check if module is in cache 19 | /******/ if(installedModules[moduleId]) { 20 | /******/ return installedModules[moduleId].exports; 21 | /******/ } 22 | /******/ // Create a new module (and put it into the cache) 23 | /******/ var module = installedModules[moduleId] = { 24 | /******/ i: moduleId, 25 | /******/ l: false, 26 | /******/ exports: {} 27 | /******/ }; 28 | /******/ 29 | /******/ // Execute the module function 30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 31 | /******/ 32 | /******/ // Flag the module as loaded 33 | /******/ module.l = true; 34 | /******/ 35 | /******/ // Return the exports of the module 36 | /******/ return module.exports; 37 | /******/ } 38 | /******/ 39 | /******/ 40 | /******/ // expose the modules object (__webpack_modules__) 41 | /******/ __webpack_require__.m = modules; 42 | /******/ 43 | /******/ // expose the module cache 44 | /******/ __webpack_require__.c = installedModules; 45 | /******/ 46 | /******/ // define getter function for harmony exports 47 | /******/ __webpack_require__.d = function(exports, name, getter) { 48 | /******/ if(!__webpack_require__.o(exports, name)) { 49 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 50 | /******/ } 51 | /******/ }; 52 | /******/ 53 | /******/ // define __esModule on exports 54 | /******/ __webpack_require__.r = function(exports) { 55 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 56 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 57 | /******/ } 58 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 59 | /******/ }; 60 | /******/ 61 | /******/ // create a fake namespace object 62 | /******/ // mode & 1: value is a module id, require it 63 | /******/ // mode & 2: merge all properties of value into the ns 64 | /******/ // mode & 4: return value when already ns object 65 | /******/ // mode & 8|1: behave like require 66 | /******/ __webpack_require__.t = function(value, mode) { 67 | /******/ if(mode & 1) value = __webpack_require__(value); 68 | /******/ if(mode & 8) return value; 69 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 70 | /******/ var ns = Object.create(null); 71 | /******/ __webpack_require__.r(ns); 72 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 73 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 74 | /******/ return ns; 75 | /******/ }; 76 | /******/ 77 | /******/ // getDefaultExport function for compatibility with non-harmony modules 78 | /******/ __webpack_require__.n = function(module) { 79 | /******/ var getter = module && module.__esModule ? 80 | /******/ function getDefault() { return module['default']; } : 81 | /******/ function getModuleExports() { return module; }; 82 | /******/ __webpack_require__.d(getter, 'a', getter); 83 | /******/ return getter; 84 | /******/ }; 85 | /******/ 86 | /******/ // Object.prototype.hasOwnProperty.call 87 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 88 | /******/ 89 | /******/ // __webpack_public_path__ 90 | /******/ __webpack_require__.p = ""; 91 | /******/ 92 | /******/ 93 | /******/ // Load entry module and return exports 94 | /******/ return __webpack_require__(__webpack_require__.s = 1); 95 | /******/ }) 96 | /************************************************************************/ 97 | /******/ ([ 98 | /* 0 */ 99 | /***/ (function(module, exports) { 100 | 101 | module.exports = __WEBPACK_EXTERNAL_MODULE__0__; 102 | 103 | /***/ }), 104 | /* 1 */ 105 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 106 | 107 | "use strict"; 108 | __webpack_require__.r(__webpack_exports__); 109 | /* harmony import */ var katex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 110 | /* harmony import */ var katex__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(katex__WEBPACK_IMPORTED_MODULE_0__); 111 | 112 | var scripts = document.body.getElementsByTagName("script"); 113 | scripts = Array.prototype.slice.call(scripts); 114 | scripts.forEach(function (script) { 115 | if (!script.type || !script.type.match(/math\/tex/i)) { 116 | return -1; 117 | } 118 | 119 | var display = script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null; 120 | var katexElement = document.createElement(display ? "div" : "span"); 121 | katexElement.setAttribute("class", display ? "equation" : "inline-equation"); 122 | 123 | try { 124 | katex__WEBPACK_IMPORTED_MODULE_0___default.a.render(script.text, katexElement, { 125 | displayMode: display 126 | }); 127 | } catch (err) { 128 | //console.error(err); linter doesn't like this 129 | katexElement.textContent = script.text; 130 | } 131 | 132 | script.parentNode.replaceChild(katexElement, script); 133 | }); 134 | 135 | /***/ }) 136 | /******/ ])["default"]; 137 | }); -------------------------------------------------------------------------------- /styleguide.txt: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2021 Khronos Group. This work is licensed under a 2 | // Creative Commons Attribution 4.0 International License; see 3 | // http://creativecommons.org/licenses/by/4.0/ 4 | 5 | = ANARI^®^ Documentation and Extensions: Procedures and Conventions 6 | ANARI Working Group 7 | :data-uri: 8 | :icons: font 9 | :toc2: 10 | :toclevels: 3 11 | :max-width: 100 12 | :numbered: 13 | :doctype: book 14 | :imagewidth: 800 15 | :fullimagewidth: width="800" 16 | :cl: : 17 | 18 | // Various special / math symbols. This is easier to edit with than Unicode. 19 | include::config/attribs.txt[] 20 | 21 | :leveloffset: 1 22 | 23 | <<<< 24 | 25 | include::copyright-ccby.txt[] 26 | 27 | <<<< 28 | 29 | [[introduction]] 30 | = Introduction 31 | 32 | This document contains required procedures and conventions when writing 33 | specifications for new ANARI APIs, extensions and layers, or related 34 | Khronos^{reg}^ documentation such as white papers and tutorials; or 35 | contributing to existing ANARI specifications. 36 | These are collectively referred to as _ANARI Documentation_ or just 37 | _documentation_ below. 38 | The primary focus is the API Specification and API extensions, although all 39 | of the markup and most of the writing style is equally applicable to other 40 | documentation. 41 | 42 | The primary purpose is to achieve consistency across the API, as well as 43 | across all of our source and output documents. 44 | Consistency makes it easier for developers, editors, reviewers, and users of 45 | our documentation to understand and modify it. 46 | 47 | This document is now formally voted on and approved by the ANARI Working 48 | Group. 49 | This means that unless explicitly stated otherwise, the procedures and 50 | conventions must be followed. 51 | If you have a strong desire to modify the procedures and conventions, such 52 | changes must be made through the normal ANARI Working Group processes. 53 | 54 | 55 | [[introduction-terminology]] 56 | == Terminology 57 | 58 | The key words *must*, *required*, *should*, *recommend*, *may*, and 59 | *optional* in this document are to be interpreted as described in RFC 2119 60 | and by the ANARI Specification in the "`Terminology`" section. 61 | 62 | 63 | [[introduction-structure]] 64 | == Document Structure 65 | 66 | The style guide is broken into four sections: 67 | 68 | * <> - the required rules for choosing 69 | names of ANARI identifiers of all types. 70 | * <> - the required procedures for creating 71 | formal ANARI core and vendor extensions. 72 | * <> - the required and recommended markup style for 73 | writing asciidoctor and XML source that follows consistent formatting 74 | and layout guidelines, tags special terms and phrases for proper 75 | processing by the spec generation tools, etc. 76 | * <> - the required and recommended writing style 77 | for overall and fine-grained structure and conventions, normative 78 | language use, API naming conventions, common words and phrases to use 79 | and to avoid, linking and cross-referencing, etc. 80 | 81 | 82 | [[introduction-asciidoc]] 83 | == Asciidoctor Markup 84 | 85 | ANARI Documentation is primarily written in Asciidoctor, a text markup 86 | language. 87 | We use the command-line asciidoctor client that is actively maintained by 88 | asciidoctor, which is documented on its website at https://asciidoctor.org. 89 | 90 | References to the Asciidoctor User Manual are to sections in the document at 91 | https://asciidoctor.org/docs/user-manual/. 92 | 93 | Asciidoctor is implemented in Ruby (https://www.ruby-lang.org/), which is 94 | available for Linux, MacOS, and Microsoft Windows. 95 | 96 | [NOTE] 97 | .Note 98 | ==== 99 | There are other implementations of asciidoctor, such as AsciidoctorJ 100 | (https://github.com/asciidoctor/asciidoctorj) and asciidoctor.js 101 | (https://github.com/asciidoctor/asciidoctor.js). 102 | In particular, GitHub and GitLab both have preview renderers for .adoc or 103 | .asciidoc files in repositories, and live preview extensions exist for 104 | Chrome and Firefox. 105 | 106 | However, because of the use of custom Ruby macros in the ANARI 107 | Specification toolchain, and the high complexity of the documents and 108 | toolchain used to generate it, these web tools cannot currently render the 109 | Specification from source. 110 | Instead, we generate HTML and PDF versions of the Specification and publish 111 | them on the Khronos website. 112 | 113 | The Asciidoctor toolchain and build process are not addressed by this 114 | document, which concentrates solely on source documents. 115 | ==== 116 | 117 | 118 | [[introduction-normative]] 119 | == Normative References 120 | 121 | Normative references are references to external documents or resources to 122 | which documentation authors must comply. 123 | 124 | [[acm-references]] 125 | Association for Computing Machinery. 126 | _Citation Style and Reference Formats_. 127 | Retrieved July 27, 2019. 128 | https://www.acm.org/publications/authors/reference-formatting . 129 | 130 | [[iso-8601]] 131 | International Organization for Standardization. 132 | _Data elements and interchange formats -- Information interchange -- 133 | Representation of dates and times_ (2004-12-01). 134 | https://www.iso.org/standard/40874.html . 135 | Also see https://www.w3.org/QA/Tips/iso-date for colloquial examples. 136 | 137 | Version 1.0.0 is the latest release of the ANARI API Specification 138 | as of the time this reference was created, but that Specification is 139 | frequently updated with minor bugfixes and clarifications. 140 | When a more recent patch release is made, it becomes the normative reference 141 | for the API. 142 | 143 | 144 | // Chapters of the text are included below 145 | 146 | include::style/naming.txt[] 147 | 148 | include::style/extensions.txt[] 149 | 150 | include::style/markup.txt[] 151 | 152 | include::style/writing.txt[] 153 | 154 | include::style/misc.txt[] 155 | 156 | // Appendices are included below 157 | // include::style/vuid.txt[] 158 | 159 | 160 | = Revision History 161 | 162 | * 2021-07-30 - Initial release for feedback. 163 | -------------------------------------------------------------------------------- /scripts/check_spec_links.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # 3 | # Copyright (c) 2018-2019 Collabora, Ltd. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Author(s): Ryan Pavlik 18 | # 19 | # Purpose: This file performs some basic checks of the custom macros 20 | # used in the AsciiDoctor source for the spec, especially 21 | # related to the validity of the entities linked-to. 22 | 23 | from pathlib import Path 24 | 25 | from reg import Registry 26 | from spec_tools.entity_db import EntityDatabase 27 | from spec_tools.macro_checker import MacroChecker 28 | from spec_tools.macro_checker_file import MacroCheckerFile 29 | from spec_tools.main import checkerMain 30 | from spec_tools.shared import (AUTO_FIX_STRING, EXTENSION_CATEGORY, MessageId, 31 | MessageType) 32 | 33 | ### 34 | # "Configuration" constants 35 | 36 | FREEFORM_CATEGORY = 'freeform' 37 | 38 | # defines mentioned in spec but not needed in registry 39 | EXTRA_DEFINES = ('ANAPI_ATTR', 'ANAPI_CALL', 'ANAPI_PTR', 'AN_NO_STDINT_H') 40 | 41 | # Extra freeform refpages in addition to EXTRA_DEFINES 42 | EXTRA_REFPAGES = ('WSIheaders', 'provisional-headers') 43 | 44 | # These are marked with the code: macro 45 | SYSTEM_TYPES = set(('void', 'char', 'float', 'size_t', 'uintptr_t', 46 | 'int8_t', 'uint8_t', 47 | 'int32_t', 'uint32_t', 48 | 'int64_t', 'uint64_t')) 49 | 50 | ROOT = Path(__file__).resolve().parent.parent 51 | DEFAULT_DISABLED_MESSAGES = set(( 52 | MessageId.LEGACY, 53 | MessageId.REFPAGE_MISSING, 54 | MessageId.MISSING_MACRO, 55 | MessageId.EXTENSION, 56 | # TODO *text macro checking actually needs fixing for Vulkan 57 | MessageId.MISUSED_TEXT, 58 | MessageId.MISSING_TEXT 59 | )) 60 | 61 | CWD = Path('.').resolve() 62 | 63 | 64 | class VulkanEntityDatabase(EntityDatabase): 65 | """Vulkan-specific subclass of EntityDatabase.""" 66 | 67 | def __init__(self, *args, **kwargs): 68 | super().__init__(*args, **kwargs) 69 | self._conditionally_recognized = set(('fname', 'sname')) 70 | 71 | def makeRegistry(self): 72 | registryFile = str(ROOT / 'xml/an.xml') 73 | registry = Registry() 74 | registry.loadFile(registryFile) 75 | return registry 76 | 77 | def getNamePrefix(self): 78 | return "an" 79 | 80 | def getPlatformRequires(self): 81 | return 'an_platform' 82 | 83 | def getSystemTypes(self): 84 | return SYSTEM_TYPES 85 | 86 | def populateMacros(self): 87 | self.addMacros('t', ['link', 'name'], ['funcpointers', 'flags']) 88 | 89 | def populateEntities(self): 90 | # These are not mentioned in the XML 91 | for name in EXTRA_DEFINES: 92 | self.addEntity(name, 'dlink', 93 | category=FREEFORM_CATEGORY, generates=False) 94 | for name in EXTRA_REFPAGES: 95 | self.addEntity(name, 'code', 96 | category=FREEFORM_CATEGORY, generates=False) 97 | 98 | def shouldBeRecognized(self, macro, entity_name): 99 | """Determine, based on the macro and the name provided, if we should expect to recognize the entity.""" 100 | if super().shouldBeRecognized(macro, entity_name): 101 | return True 102 | 103 | # The *name: macros in Vulkan should also be recognized if the entity name matches the pattern. 104 | if macro in self._conditionally_recognized and self.likelyRecognizedEntity(entity_name): 105 | return True 106 | return False 107 | 108 | 109 | class VulkanMacroCheckerFile(MacroCheckerFile): 110 | """Vulkan-specific subclass of MacroCheckerFile.""" 111 | 112 | def handleWrongMacro(self, msg, data): 113 | """Report an appropriate message when we found that the macro used is incorrect. 114 | 115 | May be overridden depending on each API's behavior regarding macro misuse: 116 | e.g. in some cases, it may be considered a MessageId.LEGACY warning rather than 117 | a MessageId.WRONG_MACRO or MessageId.EXTENSION. 118 | """ 119 | message_type = MessageType.WARNING 120 | message_id = MessageId.WRONG_MACRO 121 | group = 'macro' 122 | 123 | if data.category == EXTENSION_CATEGORY: 124 | # Ah, this is an extension 125 | msg.append( 126 | 'This is apparently an extension name, which should be marked up as a link.') 127 | message_id = MessageId.EXTENSION 128 | group = None # replace the whole thing 129 | else: 130 | # Non-extension, we found the macro though. 131 | if data.macro[0] == self.macro[0] and data.macro[1:] == 'link' and self.macro[1:] == 'name': 132 | # First letter matches, old is 'name', new is 'link': 133 | # This is legacy markup 134 | msg.append( 135 | 'This is legacy markup that has not been updated yet.') 136 | message_id = MessageId.LEGACY 137 | else: 138 | # Not legacy, just wrong. 139 | message_type = MessageType.ERROR 140 | 141 | msg.append(AUTO_FIX_STRING) 142 | self.diag(message_type, message_id, msg, 143 | group=group, replacement=self.makeMacroMarkup(data=data), fix=self.makeFix(data=data)) 144 | 145 | 146 | def makeMacroChecker(enabled_messages): 147 | """Create a correctly-configured MacroChecker instance.""" 148 | entity_db = VulkanEntityDatabase() 149 | return MacroChecker(enabled_messages, entity_db, VulkanMacroCheckerFile, ROOT) 150 | 151 | 152 | if __name__ == '__main__': 153 | default_enabled_messages = set(MessageId).difference( 154 | DEFAULT_DISABLED_MESSAGES) 155 | 156 | all_docs = [str(fn) 157 | for fn in sorted((ROOT / 'chapters/').glob('**/*.txt'))] 158 | all_docs.extend([str(fn) 159 | for fn in sorted((ROOT / 'appendices/').glob('**/*.txt'))]) 160 | 161 | checkerMain(default_enabled_messages, makeMacroChecker, 162 | all_docs) 163 | -------------------------------------------------------------------------------- /appendices/extension_index.txt: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Khronos Group Inc. 2 | // SPDX-License-Identifier: CC-BY-4.0 3 | 4 | [appendix] 5 | [[extension_index]] 6 | == Extension Index (Informative) 7 | 8 | * <>: permit runtime changeable valid array region 9 | * <>: depth of field is supported 10 | * <>: camera transformation motion blur is supported 11 | * <>: `omnidirectional` camera subtype is supported 12 | * <>: `orthographic` camera subtype is supported 13 | * <>: `perspective` camera subtype is supported 14 | * <>: camera rolling shutter is supported 15 | * <>: camera global shutter and motion blur in combination with other extensions is supported 16 | * <>: 3D stereo rendering is supported 17 | * <>: data-parallel rendering using MPI is supported 18 | * <>: relax API function synchronization requirement 19 | * <>: frames are progressively rendered 20 | * <>: `channel.normal` is supported on ANARIFrame 21 | * <>: `channel.albedo` is supported on ANARIFrame 22 | * <>: `channel.primitiveId` is supported on ANARIFrame 23 | * <>: `channel.objectId` is supported on ANARIFrame 24 | * <>: `channel.instanceId` is supported on ANARIFrame 25 | * <>: frame completion callback function parameters on ANARIFrame are supported 26 | * <>: `cone` geometry subtype is supported 27 | * <>: `curve` geometry subtype is supported 28 | * <>: `cylinder` geometry subtype is supported 29 | * <>: `isosurface` geometry subtype is supported 30 | * <>: `quad` geometry subtype is supported 31 | * <>: `quad` geometry subtype supports deformation motion blur 32 | * <>: `sphere` geometry subtype is supported 33 | * <>: `triangle` geometry subtype is supported 34 | * <>: `triangle` geometry subtype supports deformation motion blur 35 | * <>: basic `transform` instance subtype is supported 36 | * <>: the basic `transform` instance subtype supports matrix arrays 37 | * <>: `motionTransform` instance subtype and instance transformation motion blur is supported 38 | * <>: `motionScaleRotationTranslation` instance subtype and instance transformation motion blur is supported 39 | * <>: `directional` light subtype is supported 40 | * <>: `hdri` light subtype is supported 41 | * <>: `point` light subtype is supported 42 | * <>: whether primary visibility of area lights can be controlled 43 | * <>: `quad` light subtype is supported 44 | * <>: `ring` light subtype is supported 45 | * <>: `spot` light subtype is supported 46 | * <>: `matte` material subtype is supported 47 | * <>: `physicallyBased` material subtype is supported 48 | * <>: the renderer supports ambient lighting 49 | * <>: the renderer supports a background color 50 | * <>: the renderer supports a background image 51 | * <>: the renderer supports denoising 52 | * <>: `image1D` sampler subtype is supported 53 | * <>: `image2D` sampler subtype is supported 54 | * <>: `image3D` sampler subtype is supported 55 | * <>: 56 | - <> sampler `wrapMode` supports `clampToBorder` 57 | - <> sampler `wrapMode1` and `wrapMode2` support `clampToBorder` 58 | - <> sampler `wrapMode1`, `wrapMode2` and `wrapMode3` support `clampToBorder` 59 | * <>: `primitive` sampler subtype is supported 60 | * <>: `transform` sampler subtype is supported 61 | * <>: `nanovdb` spatial field subtype is supported 62 | * <>: `structuredRegular` spatial field subtype is supported 63 | * <>: `structuredRegular` spatial field supports `cubic` filtering for parameter `filter` 64 | * <>: `unstructured` spatial field subtype is supported 65 | * <>: `transferFunction1D` volume subtype is supported 66 | -------------------------------------------------------------------------------- /config/spec-macros/extension.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016-2020 The Khronos Group Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' 16 | 17 | include ::Asciidoctor 18 | 19 | class SpecInlineMacroBase < Extensions::InlineMacroProcessor 20 | use_dsl 21 | using_format :short 22 | end 23 | 24 | class NormativeInlineMacroBase < SpecInlineMacroBase 25 | def text 26 | 'normative' 27 | end 28 | 29 | def process parent, target, attributes 30 | create_inline parent, :quoted, '' + text + '' 31 | end 32 | end 33 | 34 | class LinkInlineMacroBase < SpecInlineMacroBase 35 | def process parent, target, attributes 36 | if parent.document.attributes['cross-file-links'] 37 | return Inline.new(parent, :anchor, target, :type => :link, :target => (target + '.html')) 38 | else 39 | return Inline.new(parent, :anchor, target, :type => :xref, :target => ('#' + target), :attributes => {'fragment' => target, 'refid' => target}) 40 | end 41 | end 42 | end 43 | 44 | class CodeInlineMacroBase < SpecInlineMacroBase 45 | def process parent, target, attributes 46 | create_inline parent, :quoted, '' + target.gsub('→', '->') + '' 47 | end 48 | end 49 | 50 | class StrongInlineMacroBase < SpecInlineMacroBase 51 | def process parent, target, attributes 52 | create_inline parent, :quoted, '' + target.gsub('→', '->') + '' 53 | end 54 | end 55 | 56 | class ParamInlineMacroBase < SpecInlineMacroBase 57 | def process parent, target, attributes 58 | create_inline parent, :quoted, '' + target.gsub('→', '->') + '' 59 | end 60 | end 61 | 62 | class CanInlineMacro < NormativeInlineMacroBase 63 | named :can 64 | match /can:(\w*)/ 65 | 66 | def text 67 | 'can' 68 | end 69 | end 70 | 71 | class CannotInlineMacro < NormativeInlineMacroBase 72 | named :cannot 73 | match /cannot:(\w*)/ 74 | 75 | def text 76 | 'cannot' 77 | end 78 | end 79 | 80 | class MayInlineMacro < NormativeInlineMacroBase 81 | named :may 82 | match /may:(\w*)/ 83 | 84 | def text 85 | 'may' 86 | end 87 | end 88 | 89 | class MustInlineMacro < NormativeInlineMacroBase 90 | named :must 91 | match /must:(\w*)/ 92 | 93 | def text 94 | 'must' 95 | end 96 | end 97 | 98 | class OptionalInlineMacro < NormativeInlineMacroBase 99 | named :optional 100 | match /optional:(\w*)/ 101 | 102 | def text 103 | 'optional' 104 | end 105 | end 106 | 107 | class RequiredInlineMacro < NormativeInlineMacroBase 108 | named :required 109 | match /required:(\w*)/ 110 | 111 | def text 112 | 'required' 113 | end 114 | end 115 | 116 | class ShouldInlineMacro < NormativeInlineMacroBase 117 | named :should 118 | match /should:(\w*)/ 119 | 120 | def text 121 | 'should' 122 | end 123 | end 124 | 125 | # Generic reference page link to any entity with an anchor/refpage 126 | class ReflinkInlineMacro < LinkInlineMacroBase 127 | named :reflink 128 | match /reflink:(\w+)/ 129 | end 130 | 131 | # Link to an extension appendix/refpage 132 | class ApiextInlineMacro < LinkInlineMacroBase 133 | named :apiext 134 | match /apiext:(\w+)/ 135 | end 136 | 137 | class FlinkInlineMacro < LinkInlineMacroBase 138 | named :flink 139 | match /flink:(\w+)/ 140 | end 141 | 142 | class FnameInlineMacro < CodeInlineMacroBase 143 | named :fname 144 | match /fname:(\w+)/ 145 | end 146 | 147 | class FtextInlineMacro < CodeInlineMacroBase 148 | named :ftext 149 | match /ftext:([\w\*]+)/ 150 | end 151 | 152 | class SnameInlineMacro < CodeInlineMacroBase 153 | named :sname 154 | match /sname:(\w+)/ 155 | end 156 | 157 | class SlinkInlineMacro < LinkInlineMacroBase 158 | named :slink 159 | match /slink:(\w+)/ 160 | end 161 | 162 | class StextInlineMacro < CodeInlineMacroBase 163 | named :stext 164 | match /stext:([\w\*]+)/ 165 | end 166 | 167 | class EnameInlineMacro < CodeInlineMacroBase 168 | named :ename 169 | match /ename:(\w+)/ 170 | end 171 | 172 | class ElinkInlineMacro < LinkInlineMacroBase 173 | named :elink 174 | match /elink:(\w+)/ 175 | end 176 | 177 | class EtextInlineMacro < CodeInlineMacroBase 178 | named :etext 179 | match /etext:([\w\*]+)/ 180 | end 181 | 182 | # this does not handle any [] at the moment 183 | 184 | class PnameInlineMacro < ParamInlineMacroBase 185 | named :pname 186 | match /pname:(\w+((\.|→)\w+)*)/ 187 | end 188 | 189 | class PtextInlineMacro < ParamInlineMacroBase 190 | named :ptext 191 | match /ptext:([\w\*]+((\.|→)[\w\*]+)*)/ 192 | end 193 | 194 | class DnameInlineMacro < CodeInlineMacroBase 195 | named :dname 196 | match /dname:(\w+)/ 197 | end 198 | 199 | class DlinkInlineMacro < LinkInlineMacroBase 200 | named :dlink 201 | match /dlink:(\w+)/ 202 | end 203 | 204 | class TnameInlineMacro < CodeInlineMacroBase 205 | named :tname 206 | match /tname:(\w+)/ 207 | end 208 | 209 | class TlinkInlineMacro < LinkInlineMacroBase 210 | named :tlink 211 | match /tlink:(\w+)/ 212 | end 213 | 214 | class BasetypeInlineMacro < CodeInlineMacroBase 215 | named :basetype 216 | match /basetype:(\w+)/ 217 | end 218 | 219 | # This doesn't include the full range of code: use 220 | 221 | class CodeInlineMacro < CodeInlineMacroBase 222 | named :code 223 | match /code:(\w+(\.\w+)*)/ 224 | end 225 | 226 | # The tag: and attr: macros are only used in registry.txt 227 | 228 | class TagInlineMacro < StrongInlineMacroBase 229 | named :tag 230 | match /tag:(\w+)/ 231 | end 232 | 233 | class AttrInlineMacro < StrongInlineMacroBase 234 | named :attr 235 | match /attr:(\w+)/ 236 | end 237 | 238 | # Does nothing - just markup that we've considered the use case 239 | class UndefinedInlineMacro < SpecInlineMacroBase 240 | named :undefined 241 | match /undefined:/ 242 | 243 | def process parent, target, attributes 244 | create_inline parent, :quoted, 'undefined' 245 | end 246 | end 247 | 248 | --------------------------------------------------------------------------------