fix(tsd, rtx): Drop distinlling, improve PTX stitching, CMake#350
Merged
Conversation
tarcila
commented
Jul 18, 2026
Collaborator
- Dropping distilling in favor of MDL auxilliary expressions
- Fix possibly invalid version sorting when stitching PTXs
- Only trigger debug renumber if actual debug information when stitching
- Fix a TSD hard error with find_package(pxr) when MaterialX is not found
Replace the distill-to-diffuse tint path for the albedo AOV / denoiser guide with MDL's BSDF auxiliary function (enable_auxiliary), reading a faithful diffuse+glossy albedo straight from the compiled material. Evaluated at normal incidence (k1=shading normal) for a stable, view-independent guide. Removes the mdl_distiller plugin dependency.
stitchPTXs picked the max PTX .version/.target by lexicographic string
compare, which silently downgrades once a field goes multi-digit
(".version 10.0" < "8.5", "sm_100" < "sm_52"). Parse the numeric
major/minor and sm arch and compare as integers instead.
The $L__info_string / .file / .loc renumbering in stitchPTXs is only needed under -lineinfo/-G (Debug, RelWithDebInfo). Detect a .file directive once up front and skip the slow, text-fragile renumbering passes entirely for Release blobs that carry no line info.
Can actually break find_package(pxr) if it ever sets MaterialX_DIR to NOTFOUND. Only the rtx device is actually depending on MaterialX, in the case of TSD, MaterialX is only about an abstract subtype.
jeffamstutz
reviewed
Jul 18, 2026
jeffamstutz
left a comment
Collaborator
There was a problem hiding this comment.
Can we work with USD that doesn't have MaterialX? I suppose the actual USD itself doesn't need MaterialX at runtime to load stages, correct?
Collaborator
Author
Yes, we can work with any USD build no matter MaterialX is enabled. USD detects MaterialX by itself, if it has been built with it (through find_dependency). Current (unnecessary) MaterialX detection in TSD can break this find_dependency process.
It might need it to correctly parse .mtlx references. But our very own importer does not parse the resulting USDShade graph, so this is a non issue for now. |
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.