-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -dump-module command to slangc #6638
Merged
Merged
+184
−7
Conversation
This file contains 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
667552e
to
d12d64a
Compare
/format |
🌈 Formatted, please merge the changes from this PR |
cheneym2
added a commit
to cheneym2/slang
that referenced
this pull request
Mar 18, 2025
Format code for PR shader-slang#6638
c31337a
to
cd52f2d
Compare
/format |
🌈 Formatted, please merge the changes from this PR |
cheneym2
added a commit
to cheneym2/slang
that referenced
this pull request
Mar 18, 2025
Format code for PR shader-slang#6638
c249aa0
to
3bc5d9c
Compare
The new -dump-module command to slangc will load and disassemble a slang module, similar to what would be seen by the -dump-ir command, except that -dump-ir tells slangc to print IR as it performs some compilation command. That is, -dump-ir requires some larger compilation task. -dump-module on the otherhand requires no additional goal and will simply load a module and print its IR to stdout independently from other compilation steps. Its intended purpose is to inspect .slang-module files on disk. It can also be used on .slang files which will be parsed and lowered if slang does not find an associated ".slang-module" version of the module on disk. The compilation API is extended with a new IModule::disassemble() method which retrieves the string representation of the dumped IR. Closes shader-slang#6599
/format |
🌈 Formatted, please merge the changes from this PR |
mkeshavaNV
reviewed
Mar 19, 2025
mkeshavaNV
previously approved these changes
Mar 19, 2025
csyonghe
reviewed
Mar 19, 2025
/format |
🌈 Formatted, please merge the changes from this PR |
Format code for PR shader-slang#6638
expipiplus1
approved these changes
Mar 20, 2025
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.
The new -dump-module command to slangc will load and disassemble a slang module, similar to what would be seen by the -dump-ir command, except that -dump-ir tells slangc to print IR as it performs some compilation command. That is, -dump-ir requires some larger compilation task.
-dump-module on the otherhand requires no additional goal and will simply load a module and print its IR to stdout independently from other compilation steps.
Its intended purpose is to inspect .slang-module files on disk. It can also be used on .slang files which will be parsed and lowered. Slang will not automatically load a ".slang-module" to disassemble if the user requested a ".slang" file. This is intentional to give the user control to inspect modules loaded from source independently from ones loaded from precompiled slang-modules on disk.
The compilation API is extended with a new IModule::disassemble() method which retrieves the string representation of the dumped IR.
Closes #6599