EGL Registry

repository·main·Indexed 40 days ago

https://github.com/khronosgroup/egl-registry

The authoritative source for EGL API definitions, extension registries, and specifications. This registry is used to generate C headers for EGL implementations and powers the official Khronos EGL web registry.

Tokens
810
Snippets
1
Records
5
Agent score
50%

What's inside EGL

  1. Overview of the EGL-Registry repository

    main

    The EGL-Registry repository serves as the central authority for the EGL API and Extension Registry. It contains API specifications, reference documentation, and the enumerant registry. This repository acts as the backing store for the official EGL web view at https://www.khronos.org/registry/egl/.

    Key components include:

    • api/egl.xml: The core registry defining the EGL API, extensions, and enumerant ranges. It is used to generate C headers.
    • api/EGL/ and api/KHR/: Generated and handcoded header files for EGL implementations.
    • registry.tcl: The registry for extension numbers, mapping names to index numbers.
    • extensions/: Vendor-specific EGL extension specification documents.
    • specs/: EGL specification documents.
    • sdk/: Reference pages and cards for different API versions.
  2. Add an EGL Extension Specification

    main

    To add a new extension specification, submit a pull request to main including the specification .txt file and necessary registry updates.

    Your pull request must include:

    1. Specification File: Add the .txt file under extensions/<vendor>/filename.txt.
    2. Extension Number: Allocate a number in registry.tcl by searching for "Next free extension number" and using the lowest available number. Follow existing <extension> examples.
    3. Document Update: Include the allocated extension number within the specification document itself.
    4. API Definition: Define the new interfaces in api/egl.xml following existing extension patterns. (If needed, consult the GL registry schema at www.khronos.org/registry/gl/).
    5. Web View Link: Add a link in the extensions section of index.php using the specified extension number.
    6. Encoding: Ensure the text file uses only the ASCII subset of UTF-8. If it contains inappropriate characters, clean it using iconv:
    iconv -c -f utf-8 -t ascii filename.txt
  3. Requirements for building and validating the registry

    main

    To use the build tools for validating XML and building headers, you need the following dependencies installed:

    • GNU make: For running the build process.
    • jing: Required for the make validate step (available at https://relaxng.org/jclark/jing.html).
    • Python 3.5+: Required for the make step.
    • C/C++ Compiler: (e.g., gcc or g++) Required for the make tests step.

    These components are typically available in major Linux distributions and Windows 10 via Debian WSL.

  4. Reserve EGL Enumerant Ranges

    main

    To allocate new enumerant ranges, you must propose a pull request to the main branch that modifies api/egl.xml.

    Follow these steps:

    1. Search api/egl.xml for the string "Reservable for future use".
    2. Allocate new ranges starting at the lowest available free values.
    3. Follow the pattern of existing examples in the file.

    Note: Ranges are only officially allocated once your pull request is accepted into main. Only after acceptance should you use these values for API extensions.

  5. Validate XML changes and verify header builds

    main

    When modifying api/egl.xml, you must verify that the headers regenerate correctly and remain legal C. Run the following commands in the api/ directory:

    # Validate XML changes
    make validate
    
    # Verify headers build and are legal C
    make clobber
    make
    make tests