Repository navigation
Add interpolate legalization pass - #4220
Merged
Merged
Conversation
Contributor
Author
s-perron
self-requested a review
March 29, 2021 23:31
s-perron
requested changes
Mar 30, 2021
s-perron
left a comment
Collaborator
There was a problem hiding this comment.
Generally this looks great. I like the use of the instruction folder, it cuts away a lot of the clutter, and make it clear what the pass is doing.
My suggested changes are mostly about comments and variable/function names.
I would like to see this added to the set of legalization passes. Add it to the end. DXC will need this when it starts to handle these instructions.
Collaborator
|
@greg-lunarg Looks like you will need to update the BUILD.gn file as well. |
Contributor
Author
|
I have updated BUILD.gn and added the new pass to legalization. Thanks for the thorough review! |
s-perron
requested changes
Mar 31, 2021
s-perron
left a comment
Collaborator
There was a problem hiding this comment.
Sorry, I missed a couple things in my first review.
This pass converts an internal form of GLSLstd450 Interpolate ops to the externally valid form. The external form takes the lvalue of the interpolant. The internal form can do a load of the interpolant. The pass replaces the load with its pointer. The internal form is generated by glslang and possibly other frontends for HLSL shaders. The new pass is called as part of HLSL legalization after all propagation is complete. Also adds internal interpolate form to pre-legalization validation
s-perron
approved these changes
Mar 31, 2021
Contributor
|
Sorry I did not see your message. Thank you for working on it! |
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.
This pass converts an internal form of GLSLstd450 InterpolateAt*
extended ops to the externally valid form. The external form takes
the lvalue of the interpolant operand. The internal form optionally
can take a load of the interpolant as the interpolant operand. This
pass removes that load, replacing it with the load's pointer. The
internal form is generated by glslang and possibly other frontends
for HLSL shaders. The new pass is called as part of HLSL legalization
after all propagation of interpolants is complete.
Also adds internal interpolate form to pre-legalization validation