Remove Metashade override-first library loading from MaterialXTest#16
Merged
Merged
Conversation
The Metashade Schlick BSDF override is now loaded by the Python test infrastructure (test_render_metashade.py) via explicit document loading with priority ordering. The C++ MaterialXTest extraLibraryPaths mechanism is no longer needed and was causing the Metashade override to be loaded unconditionally in all C++ render tests. Reverts the extraLibraryPaths addition originally introduced in 041705a and updated in 06790de when the submodule moved to contrib/.
…rUtil.cpp Restore stdlib-first load order in loadDependentLibraries (revert 35ef81c) and remove extra library / pbrlib genglsl source code search path registration in initializeGeneratorContext (revert 34afa78). Both were added for Metashade override-first loading in C++ tests, which is now handled by the Python test infrastructure.
There was a problem hiding this comment.
Pull request overview
This PR reverts prior C++ test-harness changes in MaterialXTest that enforced Metashade “override-first” library loading, returning behavior to the upstream (stdlib-first) load order and removing extra shader source search-path registration. The goal is to ensure Metashade overrides are applied only where explicitly intended (now handled by the Python test infrastructure), rather than affecting all C++ render tests.
Changes:
- Restore standard-library-first dependency load order in
ShaderRenderTester::loadDependentLibraries. - Remove registration of
extraLibraryPathsandlibraries/pbrlib/genglslas shader source code search paths ininitializeGeneratorContext. - Clear the default
extraLibraryPathstest option back to an empty string in_options.mtlx.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| source/MaterialXTest/MaterialXRender/RenderUtil.cpp | Reverts override-first dependent library loading and removes extra source code search path registrations. |
| resources/Materials/TestSuite/_options.mtlx | Resets extraLibraryPaths to empty to match upstream defaults and avoid unconditional Metashade overrides in C++ tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Reverts the C++ MaterialXTest changes that were made to support Metashade override-first library loading. With PR #12 merged, the override loading is now handled entirely by the Python test infrastructure (
test_render_metashade.py).Provenance
These changes effectively revert the library-path-related portions of the following PRs and commits:
extraLibraryPathsvalue041705a8extraLibraryPathsvalue in_options.mtlx35ef81ccRenderUtil.cpp34afa787initializeGeneratorContextextraLibraryPathspath (only the path portion is reverted)Changes
resources/Materials/TestSuite/_options.mtlxextraLibraryPathsback to""(matching ASWF upstream)source/MaterialXTest/MaterialXRender/RenderUtil.cpploadDependentLibraries— Restore stdlib-first load order:initializeGeneratorContext— Remove extra source code search path registration:extraLibraryPathsas source code search pathslibraries/pbrlib/genglslfor wrapper GLSL#includeresolutionWhy
mx.readFromXmlFile()with priority orderingNot changed
framesPerMaterial,envSampleCount, GPU timer infrastructure, andenableTracingoptions are intentionally preserved — these are separate profiling features from PR #1469 (autodesk-forks PRs AcademySoftwareFoundation#2821, AcademySoftwareFoundation#2822, AcademySoftwareFoundation#2824) with open upstream PRs.