Skip to content

Commit 5370bae

Browse files
committed
[LLVM][Docs][SPIRV] Correct -spirv-ext option name, reorder
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.
1 parent 531cf82 commit 5370bae

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

llvm/docs/SPIRVUsage.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,20 @@ Extensions
131131

132132
The SPIR-V backend supports a variety of `extensions <https://github.com/KhronosGroup/SPIRV-Registry/tree/main/extensions>`_
133133
that enable or enhance features beyond the core SPIR-V specification.
134-
These extensions can be enabled using the ``-spirv-extensions`` option
135-
followed by the name of the extension(s) you wish to enable. Below is a
136-
list of supported SPIR-V extensions, sorted alphabetically by their extension names:
134+
The enabled extensions can be controlled using the ``-spirv-ext`` option followed by a list of
135+
extensions to enable or disable, each prefixed with ``+`` or ``-``, respectively.
136+
137+
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:
138+
139+
``-spirv-ext=+SPV_EXT_shader_atomic_float_add,+SPV_INTEL_arbitrary_precision_integers``
140+
141+
To enable all extensions, use the following option:
142+
``-spirv-ext=all``
143+
144+
To enable all extensions except specified, specify ``all`` followed by a list of disallowed extensions. For example:
145+
``-spirv-ext=all,-SPV_INTEL_arbitrary_precision_integers``
146+
147+
Below is a list of supported SPIR-V extensions, sorted alphabetically by their extension names:
137148

138149
.. list-table:: Supported SPIR-V Extensions
139150
:widths: 50 150
@@ -220,16 +231,6 @@ list of supported SPIR-V extensions, sorted alphabetically by their extension na
220231
* - ``SPV_KHR_float_controls2``
221232
- Adds ability to specify the floating-point environment in shaders. It can be used on whole modules and individual instructions.
222233

223-
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:
224-
225-
``-spirv-ext=+SPV_EXT_shader_atomic_float_add,+SPV_INTEL_arbitrary_precision_integers``
226-
227-
To enable all extensions, use the following option:
228-
``-spirv-ext=all``
229-
230-
To enable all extensions except specified, specify ``all`` followed by a list of disallowed extensions. For example:
231-
``-spirv-ext=all,-SPV_INTEL_arbitrary_precision_integers``
232-
233234
SPIR-V representation in LLVM IR
234235
================================
235236

0 commit comments

Comments
 (0)