Skip to content

Eliminate some warnings in generated MDL code - #3071

Open
jreichel-nvidia wants to merge 7 commits into
AcademySoftwareFoundation:mainfrom
jreichel-nvidia:remove-more-warnings-v2
Open

jreichel-nvidia wants to merge 7 commits into
AcademySoftwareFoundation:mainfrom
jreichel-nvidia:remove-more-warnings-v2

Conversation

@jreichel-nvidia

Copy link
Copy Markdown
Contributor

Try to be a bit smarter and avoid generating MDL code that is not used.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant