gfx-rs Metal backend stores the shader module in order to compile it with different options for different pipeline layouts (see gfx-rs/gfx#1576). It would be great to store Ast instead of re-parsing it each time, and just provide a reference to CompilerOption at the spot where compilation is needed.
How about we remove set_compiler_options at all and make the Ast::compile(&self, &CompilerOptions) (notice &self)?
gfx-rs Metal backend stores the shader module in order to compile it with different options for different pipeline layouts (see gfx-rs/gfx#1576). It would be great to store
Astinstead of re-parsing it each time, and just provide a reference toCompilerOptionat the spot where compilation is needed.How about we remove
set_compiler_optionsat all and make theAst::compile(&self, &CompilerOptions)(notice&self)?