-
Notifications
You must be signed in to change notification settings - Fork 47
[0004] Adding spec language for unions #520
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
[0004] Adding spec language for unions #520
Conversation
This fleshes out the language design for union types.
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.
I think this is reasonable. As for the layout of the struct, saying they cannot be in constant buffers solves most of the layout issues. There is now only one layout that is used. It can change for SPIR-V with a compiler options, but the layout is still well defined by the spec.
The only concern I have is the SPIR-V implementation for function scope unions. Function scope variables in SPIR-V do not have an explicit layout. That can make an implementation awkward, but that is a SPIR-V issue. From an HLSL spec perspective this is good.
Tagging @farzonl for review. |
This fleshes out the language design for union types.
Resolves #38, resolves #523