Name Strings
SPV_GOOGLE_decorate_string
Contact
See Issues list in the Khronos SPIRV-Registry repository: https://github.com/KhronosGroup/SPIRV-Registry
Contributors
-
Hai Nguyen, Google
-
David Neto, Google
-
John Kessenich, Google
-
Lei Zhang, Google
Status
-
Complete
Version
Last Modified Date |
2018-02-16 |
Revision |
4 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.0 Revision 12.
This extension requires SPIR-V 1.0.
Overview
This extension provides two new instructions to decorate a variable or a struct member with a string.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_GOOGLE_decorate_string"
Token Number Assignments
OpDecorateStringGOOGLE |
5632 |
OpMemberDecorateStringGOOGLE |
5633 |
Modifications to the SPIR-V Specification, Version 1.0
- (Modify Section 2.4, Logical Layout of a Module)
-
Add OpDecorateStringGOOGLE and OpMemberDecorateStringGOOGLE to the list of annotation instructions under layout section 8.a.
- (Modify Section 3.32.3, Annotation instructions)
-
Add OpDecorateStringGOOGLE and OpMemberDecorateStringGOOGLE:
OpDecorateStringGOOGLE |
||||
4 + variable |
5632 |
<id> |
Literal String, Literal String, … |
OpMemberDecorateStringGOOGLE |
|||||
5 + variable |
5633 |
<id> |
Literal Number |
Literal String |
Validation Rules
To use this extension within a SPIR-V module the following OpExtension instruction must be present in the module:
OpExtension "SPV_GOOGLE_decorate_string"
Issues
-
Do we need OpMemberDecorateStringGOOGLE?
RESOLVED: Yes. It may be desirable to decorate members of an builtins interface block with string decorations.
-
Should OpDecorateStringGOOGLE and OpMemberDecorateStringGOOGLE be allowed to participate in decoration groups?
RESOLVED: No. String decorations are intended to only decorate variables or members of a structure type.
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2017-10-05 |
Hai Nguyen |
Initial draft |
2 |
2017-12-01 |
David Neto |
Make it a KHR extension, add validation rules, assign token numbers |
3 |
2018-02-04 |
Hai Nguyen |
Changed to GOOGLE extension, removed HLSL semantics |
4 |
2018-02-04 |
Hai Nguyen |
Added GOOGLE suffix, added token numbers, removed redundant sections |