Eliminate some warnings in generated MDL code - #3071
Open
jreichel-nvidia wants to merge 7 commits into
Open
jreichel-nvidia wants to merge 7 commits into
jreichel-nvidia wants to merge 7 commits into
Conversation
Detect whether graph inputs are referenced by inline MDL source expressions, and annotate unused root and compound parameters. Reduces C183 warning count from 74 to 56.
Compound material outputs must be unrolled into separate MDL calls. Annotate result temporaries whose corresponding output is disconnected. Reduces C350 warning count from 129 to 127.
Height-to-normal uses a fixed Sobel kernel and does not require the generic box and Gaussian filter-weight arrays. Reduces C350 warning count from 127 to 119.
When emitting an unrolled compound output, traverse that output's dependencies and emit only its upstream texture nodes. Reduces C350 warnings count from 119 to ~117.
Omit the ordinary image sample when all consumers are height-to-normal nodes, while retaining the explicitly offset samples used by the Sobel filter. Reduces C350 warnings count from ~117 to ~114. The cumulative warning count is reduced from 203 to 20.
Fix handling of non-inlined source code nodes.
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.
Try to be a bit smarter and avoid generating MDL code that is not used.