Name Strings

SPV_KHR_bit_instructions

Contact

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

Contributors

  • Ben Ashbaugh, Intel

Status

  • Complete

  • Approved by the SPIR Working Group: 2021-03-10

  • Approved by the Khronos Board of Promoters: 2021-04-23

Version

Last Modified Date

2021-06-23

Revision

1

Dependencies

This extension is written against the SPIR-V Specification, Version 1.5 Revision 5.

This extension requires SPIR-V 1.0.

Overview

This enables the following bit instructions to be used by SPIR-V modules without requiring the Shader capability:

  • OpBitFieldInsert

  • OpBitFieldSExtract

  • OpBitFieldUExtract

  • OpBitReverse

Extension Name

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

OpExtension "SPV_KHR_bit_instructions"

New Capabilities

This extension introduces the new capability:

BitInstructions

Modifications to the SPIR-V Specification, Version 1.5

Modify Section 3.31, "Capability", adding this row to the Capability table:

Capability Implicitly Declares

6025

BitInstructions
Uses the bit reverse, bitfield insert, and bitfield extract instructions.

Modify Section 3.37.14, "Bit Instructions", adding the BitInstructions capability to the following instructions:

OpBitFieldInsert

(The description of this instruction is unchanged.)

Capability:
Shader
BitInstructions

7

201

<id>
Result Type

Result <id>

<id>
Base

<id>
Insert

<id>
Offset

<id>
Count

OpBitFieldSExtract

(The description of this instruction is unchanged.)

Capability:
Shader
BitInstructions

6

202

<id>
Result Type

Result <id>

<id>
Base

<id>
Offset

<id>
Count

OpBitFieldUExtract

(The description of this instruction is unchanged.)

Capability:
Shader
BitInstructions

6

203

<id>
Result Type

Result <id>

<id>
Base

<id>
Offset

<id>
Count

OpBitReverse

(The description of this instruction is unchanged.)

Capability:
Shader
BitInstructions

4

204

<id>
Result Type

Result <id>

<id>
Base

Validation Rules

No new validation rules are required.

Issues

None yet.

Revision History

Rev Date Author Changes

1

2021-06-23

Ben Ashbaugh

Internal revisions