Name Strings
SPV_KHR_8bit_storage
Contact
To report problems with this extension, please open a new issue at:
Contributors
-
Alexander Galazin, Arm
-
Ruihao Zhang, Qualcomm
Notice
Copyright (c) 2016-2018 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html
Status
-
Complete
-
Approved by the SPIR Working Group: 2018-03-28
Version
Last Modified Date |
2019-06-10 |
Revision |
4 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.3 Revision 1.
This extension requires SPIR-V 1.0.
This extension requires SPV_KHR_storage_buffer_storage_class.
This extension interacts with SPV_KHR_16bit_storage.
Overview
This extension adds new StorageBuffer8BitAccess, UniformAndStorageBuffer8BitAccess, and StoragePushConstant8 capabilities to allow accesses to 8-bit integer types in the StorageBuffer, Uniform, and PushConstant storage classes.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_KHR_8bit_storage"
Modifications to the SPIR-V Specification, Version 1.1
- Modify Section 3.31, Capability, adding the following rows to the Capability table:
-
Capability Depends On 4448
StorageBuffer8BitAccess
Allows an OpTypePointer to an 8-bit OpTypeInt type used as a member of a structure in the StorageBuffer storage class.The 8-bit object pointed to by such a pointer may be the result of a width-only conversion instruction (OpSConvert, or OpUConvert) from another type or of an OpLoad, and may be used as an operand to a width-only conversion instruction to another type or as the Object operand of an OpStore.
Other uses of 8-bit types are not enabled by this capability.
4449
UniformAndStorageBuffer8BitAccess
Allows an OpTypePointer to an 8-bit OpTypeInt type used as a member of a structure in either of the Uniform or StorageBuffer storage classes.The 8-bit object pointed to by such a pointer may be the result of a width-only conversion instruction (OpSConvert, or OpUConvert) from another type or of an OpLoad, and may be used as an operand to a width-only conversion instruction to another type or as the Object operand of an OpStore.
Other uses of 8-bit types are not enabled by this capability.
StorageBuffer8BitAccess
4450
StoragePushConstant8
Allows an OpTypePointer to an 8-bit OpTypeInt type used as a member of a structure in the PushConstant storage class.The 8-bit object pointed to by such a pointer may be the result of a width-only conversion instruction (OpSConvert, or OpUConvert) from another type or of an OpLoad.
Other uses of 8-bit types are not enabled by this capability.
Interactions with optional types
If the Int8 capability is declared, then the 8-bit OpTypeInt instruction mentioned earlier can be used as an operand or a result to any supported instruction with an 8-bit result type or an 8-bit operand type.
If the Int16 or the Float16 capability is declared, then the 8-bit OpTypeInt instruction mentioned earlier can be used as an operand or a result to any supported conversion instruction with a 16-bit result type or a 16-bit operand type.
If the Int64 or the Float64 capability is declared, then the 8-bit OpTypeInt instruction mentioned earlier can be used as an operand or result to any supported conversion instruction with a 64-bit result type or a 64-bit operand type.
Interactions with SPV_KHR_16bit_storage
If any capability is declared from the SPV_KHR_16bit_storage extension, then the object produced by dereferencing a pointer pointing to 8-bit data can be used as an operand or a result to a width-only conversion instruction with a 16-bit result type or a 16-bit operand type, and in addition, the object produced by dereferencing a pointer pointing to 16-bit data mentioned in the Capability section of the SPV_KHR_16bit_storage extension can be used as an operand or a result to a width-only conversion instruction with an 8-bit result type or an 8-bit operand type.
Issues
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2017-10-05 |
Alexander Galazin |
Initial revision |
2 |
2017-11-01 |
Alexander Galazin |
Assigned token numbers |
3 |
2018-03-28 |
David Neto |
Record approval by SPIR Working Group |
4 |
2019-06-10 |
John Kessenich |
Rationalize and clean up |