Name Strings
SPV_INTEL_shader_integer_functions2
Contact
See Issues list in the Khronos SPIRV-Registry repository: https://github.com/KhronosGroup/SPIRV-Registry
Contributors
-
Ian Romanick, Intel
-
Ben Ashbaugh, Intel
Notice
Copyright (c) 2018 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html
Status
Final Draft
Version
Last Modified Date |
2019-01-22 |
Revision |
2 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.3 Revision 1.
This extension requires SPIR-V 1.0.
Overview
This extension is written to provide the functionality of the INTEL_shader_integer_functions2, OpenGL Shading Language Specification extensions, to SPIR-V.
This extension introduces several new integer instructions to SPIR-V for use in graphics shaders. Many of these instructions have pre-existing counterparts in the Kernel environment.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_INTEL_shader_integer_functions2"
New Capabilities
This extension introduces a new capability:
IntegerFunctions2INTEL
New Instructions
Instructions added under IntegerFunctions2INTEL capability.
OpUCountLeadingZeros OpUCountTrailingZeros OpAbsISub OpAbsUSub OpIAddSat OpUAddSat OpIAverage OpUAverage OpIAverageRounded OpUAverageRounded OpISubSat OpUSubSat OpIMul32x16 OpUMul32x16
Token Number Assignments
Name | Value | Usage |
---|---|---|
IntegerFunctions2INTEL |
5584 |
Capability |
OpUCountLeadingZeros |
5585 |
Opcode |
OpUCountTrailingZeros |
5586 |
Opcode |
OpAbsISub |
5587 |
Opcode |
OpAbsUSub |
5588 |
Opcode |
OpIAddSat |
5589 |
Opcode |
OpUAddSat |
5590 |
Opcode |
OpIAverage |
5591 |
Opcode |
OpUAverage |
5592 |
Opcode |
OpIAverageRounded |
5593 |
Opcode |
OpUAverageRounded |
5594 |
Opcode |
OpISubSat |
5595 |
Opcode |
OpUSubSat |
5596 |
Opcode |
OpIMul32x16 |
5597 |
Opcode |
OpUMul32x16 |
5598 |
Opcode |
Modifications to the SPIR-V Specification, Version 1.3
Capabilities
Modify Section 3.31, "Capability", adding these rows to the Capability table:
Capability | Depends On | |
---|---|---|
5584 |
IntegerFunctions2INTEL |
(Add to the table in 3.32.13, Arithmetic Instructions)
OpUCountLeadingZeros |
||||
4 |
5585 |
<id> |
Result <id> |
<id> |
OpUCountTrailingZeros |
||||
4 |
5586 |
<id> |
Result <id> |
<id> |
OpAbsISub |
|||||
5 |
5587 |
<id> |
Result <id> |
<id> |
<id> |
OpAbsUSub |
|||||
5 |
5588 |
<id> |
Result <id> |
<id> |
<id> |
OpIAddSat |
|||||
5 |
5589 |
<id> |
Result <id> |
<id> |
<id> |
OpUAddSat |
|||||
5 |
5590 |
<id> |
Result <id> |
<id> |
<id> |
OpIAverage |
|||||
5 |
5591 |
<id> |
Result <id> |
<id> |
<id> |
OpUAverage |
|||||
5 |
5592 |
<id> |
Result <id> |
<id> |
<id> |
OpIAverageRounded |
|||||
5 |
5593 |
<id> |
Result <id> |
<id> |
<id> |
OpUAverageRounded |
|||||
5 |
5594 |
<id> |
Result <id> |
<id> |
<id> |
OpISubSat |
|||||
5 |
5595 |
<id> |
Result <id> |
<id> |
<id> |
OpUSubSat |
|||||
5 |
5596 |
<id> |
Result <id> |
<id> |
<id> |
OpIMul32x16 |
|||||
5 |
5597 |
<id> |
Result <id> |
<id> |
<id> |
OpUMul32x16 |
|||||
5 |
5598 |
<id> |
Result <id> |
<id> |
<id> |
Issues
None yet.
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2018-09-10 |
idr |
Initial revision |
2 |
2019-01-22 |
idr |
Remove all references to Signedness being 1 |