Repository navigation
[spirv] support [[vk::ext_decorate_id]] attribute - #4194
Conversation
As a part of HLSL version of GL_EXT_spirv_intrinsics, this commit adds vk::ext_decorate_id attribute. Related to microsoft#3919
|
JiaoluAMD (@jiaolu) This is another PR for #3919. Could you please review the code? |
| const auto &stringWords = string::encodeSPIRVString(strParam); | ||
| params.insert(params.end(), stringWords.begin(), stringWords.end()); | ||
| for (llvm::StringRef str : strParams) { | ||
| const auto &stringWords = string::encodeSPIRVString(str); |
There was a problem hiding this comment.
so you want to have with multiple strings input to the ext_decorate_string
vk::ext_decorate_string(5635, "return", "variable", "kk0")]]
and concatenate all the string together at the end .
It looks like syntax sugar to me.
There was a problem hiding this comment.
This is a minor change because the only decoration I know that we use for OpDecorateString is UserSemantic and it has only a single parameter, which means your initial implementation looks good for the current SPIR-V spec.
However, I checked OpDecorateString and just wanted to make it the same as its actual operands in the spec. It has "Optional Literals See Decoration." as the last operand that specifies zero or multiple string literals at the end.
There was a problem hiding this comment.
This is a minor change because the only decoration I know that we use for
OpDecorateStringisUserSemanticand it has only a single parameter, which means your initial implementation looks good for the current SPIR-V spec.However, I checked OpDecorateString and just wanted to make it the same as its actual operands in the spec. It has "Optional Literals See Decoration." as the last operand that specifies zero or multiple string literals at the end.
The operands here means multiple literals, not multiple strings.
Actually, the spirv specifically says,
"
OpDecorateString (OpDecorateStringGOOGLE)
Add a string Decoration to another .
"
"Add A string", i guess it means one string.
There was a problem hiding this comment.
Oops. Ok. I will doulecheck it and open an issue for it.
As a part of HLSL version of GL_EXT_spirv_intrinsics, this commit adds
vk::ext_decorate_id attribute.
Related to #3919