Skip to content

Commit 1194353

Browse files
MaetveisKeenuts
andauthored
[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 <[email protected]>
1 parent 0a41e7c commit 1194353

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

llvm/docs/SPIRVUsage.rst

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,23 @@ 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 KHR extensions, use the following option:
145+
``-spirv-ext=khr``
146+
147+
To enable all extensions except specified, specify ``all`` followed by a list of disallowed extensions. For example:
148+
``-spirv-ext=all,-SPV_INTEL_arbitrary_precision_integers``
149+
150+
Below is a list of supported SPIR-V extensions, sorted alphabetically by their extension names:
137151

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

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-
233237
SPIR-V representation in LLVM IR
234238
================================
235239

0 commit comments

Comments
 (0)