Repository navigation
Build shared libraries with Perfetto tracing in the presets - #94
Merged
Merged
Conversation
Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
Python can only collect the C++ trace events when all modules share one MaterialXTrace library. Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
There was a problem hiding this comment.
🟡 Changes recommended
The preset leaves Slang enabled in existing CMake caches, producing an unsupported shared target, and its default pip installation omits required DLLs, causing imports to fail in fresh Windows Python processes.
2 open issues
What changed in this PR
Prepares the Windows presets for tracing from Python by enabling shared MaterialX libraries, allowing Python extension modules and C++ code to share the tracing implementation.
Changes:
- Enables shared libraries and Perfetto tracing.
- Removes the explicit Slang renderer override, relying on its default-off setting.
- Adds a Release installation task that depends on the Release build.
| File | Description |
|---|---|
CMakePresets.json |
Enables shared libraries and tracing; removes the Slang renderer override. |
.vscode/tasks.json |
Adds the “Install MaterialX Release” task. |
Review effort: Balanced
| "MATERIALX_BUILD_PYTHON": "ON", | ||
| "MATERIALX_BUILD_TESTS": "ON", | ||
| "MATERIALX_BUILD_RENDER_SLANG": "ON" | ||
| "MATERIALX_BUILD_SHARED_LIBS": "ON", |
Member
Author
There was a problem hiding this comment.
Not important because the presets only affect local setups. The build would fail explicitly.
| "MATERIALX_BUILD_PYTHON": "ON", | ||
| "MATERIALX_BUILD_TESTS": "ON", | ||
| "MATERIALX_BUILD_RENDER_SLANG": "ON" | ||
| "MATERIALX_BUILD_SHARED_LIBS": "ON", |
Member
Author
|
Logged the Slang shared build issue as #95 |
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.

Prepares the Windows presets for tracing from Python. A Python extension module is always a DLL, so with static MaterialX libraries each module would link its own copy of
MaterialXTrace, and a trace started from Python would miss the events emitted from C++.MATERIALX_BUILD_SHARED_LIBSandMATERIALX_BUILD_PERFETTO_TRACING.MATERIALX_BUILD_RENDER_SLANG, leaving it at its default (off).MaterialXRenderSlangdoesn't compile as a shared library yet.