[llvm] 1194353 - [LLVM][Docs][SPIRV] Correct `-spirv-ext` option name, reorder (#150423)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 1 00:46:10 PDT 2025


Author: Mészáros Gergely
Date: 2025-08-01T09:46:08+02:00
New Revision: 11943536508719d7de9c60cf8b468b50764c0d7a

URL: https://github.com/llvm/llvm-project/commit/11943536508719d7de9c60cf8b468b50764c0d7a
DIFF: https://github.com/llvm/llvm-project/commit/11943536508719d7de9c60cf8b468b50764c0d7a.diff

LOG: [LLVM][Docs][SPIRV] Correct `-spirv-ext` option name, reorder (#150423)

The option is `-spirv-ext` not `-spirv-extensions`. Also move the
examples after the description of the option, instead of after the list
of extensions, where its easy to miss when skimming.

---------

Co-authored-by: Nathan Gauër <github at keenuts.net>

Added: 
    

Modified: 
    llvm/docs/SPIRVUsage.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/SPIRVUsage.rst b/llvm/docs/SPIRVUsage.rst
index 1f563fbfb725a..fdefc53b32aba 100644
--- a/llvm/docs/SPIRVUsage.rst
+++ b/llvm/docs/SPIRVUsage.rst
@@ -131,9 +131,23 @@ Extensions
 
 The SPIR-V backend supports a variety of `extensions <https://github.com/KhronosGroup/SPIRV-Registry/tree/main/extensions>`_
 that enable or enhance features beyond the core SPIR-V specification.
-These extensions can be enabled using the ``-spirv-extensions`` option
-followed by the name of the extension(s) you wish to enable. Below is a
-list of supported SPIR-V extensions, sorted alphabetically by their extension names:
+The enabled extensions can be controlled using the ``-spirv-ext`` option followed by a list of
+extensions to enable or disable, each prefixed with ``+`` or ``-``, respectively.
+
+To enable multiple extensions, list them separated by comma. For example, to enable support for atomic operations on floating-point numbers and arbitrary precision integers, use:
+
+``-spirv-ext=+SPV_EXT_shader_atomic_float_add,+SPV_INTEL_arbitrary_precision_integers``
+
+To enable all extensions, use the following option:
+``-spirv-ext=all``
+
+To enable all KHR extensions, use the following option:
+``-spirv-ext=khr``
+
+To enable all extensions except specified, specify ``all`` followed by a list of disallowed extensions. For example:
+``-spirv-ext=all,-SPV_INTEL_arbitrary_precision_integers``
+
+Below is a list of supported SPIR-V extensions, sorted alphabetically by their extension names:
 
 .. list-table:: Supported SPIR-V Extensions
    :widths: 50 150
@@ -220,16 +234,6 @@ list of supported SPIR-V extensions, sorted alphabetically by their extension na
    * - ``SPV_KHR_float_controls2``
      - Adds ability to specify the floating-point environment in shaders. It can be used on whole modules and individual instructions.
 
-To enable multiple extensions, list them separated by comma. For example, to enable support for atomic operations on floating-point numbers and arbitrary precision integers, use:
-
-``-spirv-ext=+SPV_EXT_shader_atomic_float_add,+SPV_INTEL_arbitrary_precision_integers``
-
-To enable all extensions, use the following option:
-``-spirv-ext=all``
-
-To enable all extensions except specified, specify ``all`` followed by a list of disallowed extensions. For example:
-``-spirv-ext=all,-SPV_INTEL_arbitrary_precision_integers``
-
 SPIR-V representation in LLVM IR
 ================================
 


        


More information about the llvm-commits mailing list