rspirv2 disassembly - #632
Conversation
f6f9bea to
7d58b22
Compare
| } | ||
|
|
||
| use rspirv::binary::Disassemble; | ||
| use rspirv::binary::{Assemble, Disassemble}; |
There was a problem hiding this comment.
rspirv2 doesn't have its own traits here?
There was a problem hiding this comment.
I assume you mean the function arg impl Assemble? That just needs to be rspirv's Assemble (can even drop Disassemble) to accept both rspirv's Module (compiletests with disassemble and disassemble-global) or Function (disassemble-function) as args. And turn those into bytes that rspirv2 can then "parse" (since it decodes on the fly, it doesn't actually parse it) and disassemble.
| .unwrap(); | ||
| module | ||
| .dis(DisOptions { | ||
| color: false, |
There was a problem hiding this comment.
Color should be taken from the session context's --color value
There was a problem hiding this comment.
Nope we can't. compiletest-rs would compare our output with ascii sequences to the *.stderr file without any, and fail every test. (Though it does print pretty colors while doing so :D )
We released rspirv2 🎉