Re:Compilers and IRS: LLVM IR, SPIR-V, and MLIR
by imtringued on Sunday October 30, 2022 @06:18AM
(#33393047)
Games ship with source based shaders. SPIR-V basically means games ship binary shaders.
Re:Compilers and IRS: LLVM IR, SPIR-V, and MLIR
by TazeTSchnitzel on Sunday October 30, 2022 @06:55AM
(#33393292)
SPIR-V is a lot more like minified JavaScript or JVM bytecode than it is like x86 code, at least. In some cases the games' shaders haven't had any optimisation done and you can more or less fully reconstruct the original GLSL, albeit without comments or identifiers.
Also a lot of textual shaders were already unreadable generated code. But for the ones that weren't, it's definitely a loss for those of us trying to peak at the internals of games, indeed :)
Re:Compilers and IRS: LLVM IR, SPIR-V, and MLIR
by thechao on Sunday October 30, 2022 @09:48AM
(#33394483)
I … don’t know? Originally, it just felt like some janky subset of LLVM-IR: close enough to almost work with the standard tooling, right out of the box, but not quite. It’s been nearly 10 years since I’ve looked at it, though, so what do I know? I don’t even know if they kept the design I was shown.
Out of curiosity, why?