-
Notifications
You must be signed in to change notification settings - Fork 764
[Draft] Rewrite output parameters #5249
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
base: main
Are you sure you want to change the base?
Conversation
This change is a huge swath of changes rewriting how HLSL represents pointers, references and arrays as well as the handling of output parameters in function signatures. The main changes included in this PR are: * Restoring Array->Pointer Decay in the HLSL ASTs. * Representing all output parameters using reference types in the AST. * Adding a new HLSLOutParamExpr AST node for output parameters. *Adding a new HLSLArrayTemporaryExpr to represent temporary array values. There are also a large number of associated fixes and patches to make the code generation and optimization code resilient to the new AST and IR structures that are generated.
For more information on the changes contained here see: Revising HLSL |
❌ Build DirectXShaderCompiler 1.0.3260 failed (commit 9c93ab218e by @llvm-beanz) |
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 took a look at the SPIR-V changes, and nothing looks like it should be a problem.
I'll take a look at the failing spir-v test to make sure the newly generated spir-v makes sense. |
Some of the failing tests are real problems that need to be fixed:
I still have to look at ~30 more failing test cases. |
|
Related to #2419 |
This change is a huge swath of changes rewriting how HLSL represents pointers, references and arrays as well as the handling of output parameters in function signatures.
The main changes included in this PR are:
There are also a large number of associated fixes and patches to make the code generation and optimization code resilient to the new AST and IR structures that are generated.
Disclaimer: This is a massive PR with no good way to break it up. In the current state there are still some test failures that I need to resolve, but I want to get this in front of people to review before it gets any bigger.
Fixes #5377