Repository navigation
[SPIRV] Fix decoration attributes on members. - #7137
Conversation
This commit implements adding the `vk::ext_decorate` on a field. It also adds an error in sema if `vk::ext_decorate_id` or `vk::ext_decorate_string` are used on members. For `vk::ext_decorate_id`, there is no `OpMemberDecorateId` instruction, so we cannot add apply these decorations to members. For `vk::ext_decorate_string`, there is only one decoration that uses OpDecorateString or OpMemberDecorateString, UserSemantic. However, that decoration could have used OpDecorate or OpMemberDecorate because those instructions accept string literals. I do not expect any new decorations to use OpDecorateString or OpMemberDecorateString. I may eventually want to deprecate `vk::ext_decorate_string`. Fixes microsoft#4195
|
Steven Perron (@s-perron) Damyan Pepper (@damyanp) |
|
I'll let Damyan Pepper (@damyanp) decide how to handle this. I just don't want to remove test coverage. |
You should be able to add a line to the test: // REQUIRES: spirv |
|
Shouldn't vk::ext_decorate_string support Fields if there exists OpMemberDecorateString? Our code is currently broken because of this change because vk::ext_decorate_string does not support Fields anymore and vk::ext_decorate does not support strings |
Your code was probably not doing what you thought it did. Before this change, the decoration attributes on members were ignored. See https://godbolt.org/z/EMsKMMj1E. Note that there is no OpMemberDecorateString. Please open a new issue with details about what you are trying to do, and why you feel this is a regression. |
This commit implements adding the
vk::ext_decorateon a field. It alsoadds an error in sema if
vk::ext_decorate_idorvk::ext_decorate_stringare used on members.For
vk::ext_decorate_id, there is noOpMemberDecorateIdinstruction,so we cannot add apply these decorations to members.
For
vk::ext_decorate_string, there is only one decoration that usesOpDecorateString or OpMemberDecorateString, UserSemantic. However, that
decoration could have used OpDecorate or OpMemberDecorate because those
instructions accept string literals. I do not expect any new decorations
to use OpDecorateString or OpMemberDecorateString. I may eventually want
to deprecate
vk::ext_decorate_string.Fixes #4195