[SPIR-V] Block semantic annotation reuse for input#6396
Merged
Keenuts merged 1 commit intomicrosoft:mainfrom Mar 8, 2024
Merged
[SPIR-V] Block semantic annotation reuse for input#6396Keenuts merged 1 commit intomicrosoft:mainfrom
Keenuts merged 1 commit intomicrosoft:mainfrom
Conversation
The MSDN spec is not very clear regarding input parameter aliasing, BUT DXIL & MS agrees (See microsoft#3737) using the same semantic annotation twice should be disallowed. DXIL currently disallows it for most, and due to a bug, allows some compute related semantics to be aliased. SPIR-V did allowed aliasing, but it was a implemented as a hack causing typing issues if the type changed between the 2 parameters using the same semantic annotation. To align more closely with DXIL, and the "spec", we are not disallowing all semantic attribute reuse for input parameters. Fixes microsoft#3737 Signed-off-by: Nathan Gauër <brioche@google.com>
sudonatalie
approved these changes
Mar 7, 2024
Collaborator
sudonatalie
left a comment
There was a problem hiding this comment.
Even though it's a bit breaking, this seems reasonable to me. Thanks for all the background work looking into this.
To align more closely with DXIL, and the "spec", we are not disallowing all semantic attribute reuse for input parameters.
s/not/now?
Collaborator
Author
If users complain, maybe we could limit that to some specific shader model like 6+ (as the SPIR-V doc does says we support all shader model < 5..)
Ah yes thanks! |
cassiebeckley
approved these changes
Mar 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MSDN spec is not very clear regarding input parameter aliasing, BUT DXIL & MS agrees (See #3737) using the same semantic annotation twice should be disallowed.
DXIL currently disallows it for most, and due to a bug, allows some compute related semantics to be aliased.
SPIR-V did allowed aliasing, but it was a implemented as a hack causing typing issues if the type changed between the 2 parameters using the same semantic annotation.
To align more closely with DXIL, and the "spec", we are now disallowing all semantic attribute reuse for input parameters.
Fixes #3737