-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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
✅ Build DirectXShaderCompiler 1.0.1077 completed (commit b3c922efa6 by @jaebaek) |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a minor change because the only decoration I know that we use for
OpDecorateString
isUserSemantic
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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