Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPV_EXT_optnone extension #260

Merged
merged 6 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Khronos SPIR-V Registry](https://www.khronos.org/registry/spir-v/).
* [SPV_EXT_image_raw10_raw12 ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_image_raw10_raw12.html)
* [SPV_EXT_mesh_shader ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_mesh_shader.html)
* [SPV_EXT_opacity_micromap ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_opacity_micromap.html)
* [SPV_EXT_optnone ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_optnone.html)
* [SPV_EXT_physical_storage_buffer ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_physical_storage_buffer.html)
* [SPV_EXT_relaxed_printf_string_address_space]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_relaxed_printf_string_address_space.html)
* [SPV_EXT_replicated_composites ]( https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_replicated_composites.html)
Expand Down
124 changes: 124 additions & 0 deletions extensions/EXT/SPV_EXT_optnone.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
SPV_EXT_optnone
===============

Name Strings
------------

SPV_EXT_optnone

Contact
-------

To report problems with this extension, please open a new issue at:

https://github.com/KhronosGroup/SPIRV-Headers

Contributors
------------

- Mariya Podchishchaeva, Intel
- Ben Ashbaugh, Intel
- Alexey Sotkin, Intel
- Joe Garvey, Intel
- Dmitry Sidorov, Intel

Notice
------

Copyright (c) 2024 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html

Status
------
* Complete

Version
-------

[width="40%",cols="25,25"]
|========================================
| Last Modified Date | 2024-06-21
| Revision | 2
|========================================

Dependencies
------------

This extension is written against the SPIR-V Specification,
Version 1.6 Revision 3, Unified

This extension requires SPIR-V 1.0.

Overview
--------

This extension adds new possible value for Function Control mask - *OptNoneEXT*,
which represents a strong request to not optimize the function. It is useful in cases
where the user wants to debug a particular function without sacrificing performance of
the entire application, and this is accomplished by disabling optimizations solely
for that particular function instead of the entire module.

Extension Name
--------------

To use this extension within a SPIR-V module, the following
*OpExtension* must be present in the module:

----
OpExtension "SPV_EXT_optnone*
----

Modifications to the SPIR-V Specification, Version 1.6, Revision 3, Unified
---------------------------------------------------------------------------
Capabilities
~~~~~~~~~~~~

Modify Section 3.31, "Capability", adding these rows to the Capability table:

--
[options="header"]
|====
2+^| Capability ^| Implicitly Declares
| 6094 | *OptNoneEXT* +
Allow to use *OptNoneEXT* Function Control mask value |
bashbaug marked this conversation as resolved.
Show resolved Hide resolved
|====
--


Function Control
~~~~~~~~~~~~~~~~

In section 3.24 "Function Control" add the following row to the Function Control
table:
[cols="1,4,4",options="header",width="100%"]
|====
2+| Function Control | <<Capability,Enabling Capabilities>> |
0x10000 | *OptNoneEXT* +
Strong request, to the extent possible, to not optimize the function. Only functions
with *Inline* _Function Control_ mask can be considered to be inlined into the
function. +
This function should never be inlined. +
It must not be used together with *Inline* bit. +
| *OptNoneEXT*
|====


Issues
------


Discussion:

...


Revision History
----------------

[cols="5,15,15,70"]
[grid="rows"]
[options="header"]
|========================================
|Rev|Date|Author|Changes
|1|2020-12-15|Mariya Podchishchaeva|Initial revision
|2|2024-06-21|Dmitry Sidorov|Prepare for publication
|========================================
Loading