Vulkan Documentation

repository·main·Indexed 25 days ago

https://github.com/khronosgroup/vulkan-docs

Documentation for Vulkan extensions and core specifications, including VK_EXT_device_memory_report, VK_EXT_layer_settings, VK_EXT_pipeline_creation_cache_control, VK_FUCHSIA_buffer_collection, VK_KHR_buffer_device_address, and VK_KHR_display.

Tokens
88.8K
Snippets
127
Records
514
Agent score
84%

What's inside vulkan-docs

  1. Overview of the Vulkan API Documentation Project

    main

    The Vulkan-Docs repository contains the formal documentation sources for the Vulkan API. Developers can use this repository to access the following resources:

    • Vulkan API Specification: The formal technical specification.
    • API Extensions Specification: Documentation for specific API extensions.
    • API Reference: man pages for the API.
    • XML API Registry: The registry used to define the API (also mirrored in Vulkan-Headers).
    • Vulkan Header Files: The C/C++ header files (also mirrored in Vulkan-Headers).
    • Related Tools and Scripts: Utilities for managing or generating documentation.

    Note: While this repository includes sources for the Vulkan SC specification to simplify maintenance, these are not considered normative. Formal Vulkan SC sources are located in READMESC.adoc.

  2. Overview of VK_KHR_swapchain

    main

    The VK_KHR_swapchain extension is a device-level companion to VK_KHR_surface. It introduces VkSwapchainKHR objects, which allow an application to present rendering results to a surface.

    Key characteristics:

    • Memory Management: Unlike standard images, the implementation allocates the memory backing the presentable images.
    • Sampling: Presentable images are always single-sampled. For multi-sampled rendering (MSAA), you must manually resolve the multi-sampled image to a single-sampled presentable image before presentation.
    • Stereo/Multi-view: Supports stereo/multi-view via the imageArrayLayers parameter during swapchain creation. All images in a swapchain share the same array size.
    • Synchronization: The vkQueuePresentKHR command operates on a queue. The vkAcquireNextImageKHR command accepts a semaphore to signal, allowing explicit synchronization between acquiring an image and using it in subsequent queue operations.
  3. Overview of VK_EXT_device_generated_commands

    main
    The VK_EXT_device_generated_commands extension enables efficient indirect execution of command sequences generated by the device (e.g., via compute shaders). This reduces host overhead and unnecessary state changes by allowing the device to manage complex tasks like scene traversal, LoD management, and culling. It provides a unified framework for graphics, compute, and ray tracing indirect commands, supporting shader changes, push constants, and buffer bindings within a single interleaved stream.
  4. Overview of Vulkan Specification Repository Scripts

    main

    This directory contains scripts used to build the Vulkan API specification and related artifacts. Most scripts are invoked from the top-level directory or from the API Registry in ../xml to build generated components.

    Core Generation Scripts

    • genvk.py: Python script to generate Vulkan headers and other targets.
    • reg.py: Python tools to read registry XML files and call generators for headers and other outputs.
    • generator.py: Base class for output generators, including:
      • cgenerator.py: C header output.
      • docgenerator.py: Asciidoc interface language includes.
      • extensionmetadocgenerator.py: Asciidoc extension descriptions.
      • hostsyncgenerator.py: Asciidoc host sync tables.
      • interfacedocgenerator.py: Asciidoc extension appendix interfaces.
      • pygenerator.py, rubygenerator.py, scriptgenerator.py: Python and Ruby encodings of API descriptions.
      • spirvcapgenerator.py: Asciidoc SPIR-V capability tables.
      • validitygenerator.py: Asciidoc validity language.

    Specification Building and Validation

    • genRelease, genspec.py: Build HTML and PDF Specifications with options for target directories and extensions.
    • check_spec_links.py: Validates markup and content in the Asciidoctor specification source.
    • genRef.py, reflib.py, makemanaliases.py: Extract API reference pages into single-page documents and manage symbolic links for API aliases.
    • reflow.py, reflow_count.py: Reflow specification source text to follow style guidelines and insert Valid Usage statements.
    • indexExt.py: Generate HTML index of all extensions.
    • xml_consistency.py: Perform internal consistency checks on vk.xml.
  5. Overview of Spec Build Tests

    main

    The build_tests directory contains the source files and expectation files used by the testBuild script to verify the correctness of AsciiDoc extensions in the Vulkan documentation repository.

    Test Specification Files

    • testspec.adoc
    • chapters/*.adoc
    • chapters/commonvalidity/*.adoc
    • appendices/*.adoc
    • images/*.svg

    Expectation Files

    • expectations/*.html
    • expectations/validusage.json
  6. Overview of Vulkan Registry Generation Scripts

    main

    The Vulkan Registry uses Python scripts to transform XML definitions into various outputs. The primary scripts located in the scripts/ directory are:

    • genvk.py: The header generation script. It extracts interfaces based on an API name and profile name to create C-language header files.
    • reg.py: The registry processing script. It contains objects and methods for loading registries and extracting interfaces/extensions.
    • generator.py: The output generator framework. It uses classes like COutputGenerator (for C headers) and DocOutputGenerator (for AsciiDoc includes) to create artifacts.

    Other specialized generators include cgenerator.py, docgenerator.py, hostsyncgenerator.py, validitygenerator.py, pygenerator.py, and extensionStubSource.py.

  7. Overview of the Vulkan SC API Documentation Project

    main

    The Vulkan SC API Documentation project provides the formal documentation and source materials for the Vulkan SC API. This includes the API Specification, extension specifications, API reference ('man') pages, the XML API Registry, Vulkan SC header files, and related tools/scripts.

    Note that Vulkan SC header files and the XML API Registry are also mirrored in the Vulkan-Headers repository under the sc_main branch.

  8. Access Vulkan and Vulkan SC API Documentation

    main

    This repository contains the source documentation for both the Vulkan and Vulkan SC APIs.

    • For Vulkan API specific documentation, refer to READMEVK.adoc.
    • For Vulkan SC API specific documentation, refer to READMESC.adoc.