-
Notifications
You must be signed in to change notification settings - Fork 263
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
-dump-ir should print disassembly of downstream target SPIR-V IR for embedded blobs. #6513
Comments
I don't know offhand the correct place to add -dump-ir support which would show embedded downstream IR and decorations, but this hack shows you what the current IR dumping logic does with the decorations:
|
The expectation is that the logic that prints out the "EmbeddedDownstreamIR" instruction is updated. Right now, it just shows an ID operand indicating SPIRV (6), followed by the word "binary blob" that represents the OpBlobLit operand. But ideally the blob would show up as disassembled SPIR-V if the target operand is SLANG_SPIRV (6). I don't think it's a trivial task, hence the 3 day estimate. It's an additional task to make it so that -dump-ir shows this post-precompileForTarget output, since "LOWER-TO-IR" is too early. I didn't initially think of that complication when writing the github issue. Maybe the estimate should be 4 days. Filecheck should naturally be able to check for embedded SPIRV operations then. |
When dumping IR that contains embedded downstream SPIR-V code (via EmbeddedDownstreamIR instructions), display the disassembled SPIR-V instead of just showing "<binary blob>". This CL also does: - Adds a new interface for disassembly and get result. - Modify export-library-generics.slang test test to check for the disassembled SPIR-V Fixes shader-slang#6513
When dumping IR that contains embedded downstream SPIR-V code (via EmbeddedDownstreamIR instructions), display the disassembled SPIR-V instead of just showing "<binary blob>". This CL also does: - Adds a new interface for disassembly and get result. - Modify export-library-generics.slang test test to check for the disassembled SPIR-V Fixes shader-slang#6513
-dump-ir should print disassembly of downstream target IR for embedded blobs
This request is for SPIR-V in particular.
At least one slang-test should demonstrate the capability by using "filecheck" for SPIR-V in a precompiled module, looking at the "-dump-ir" output and looking for one or two key ops, e.g. "OpCapability Linkage" and "OpDecorate... LinkageAttributes ... Export" would be good ones to check for.
The text was updated successfully, but these errors were encountered: