1
0
Fork 0
forked from wry/wry

vulkan: use single push constant range per pipeline

This commit is contained in:
Julian Orth 2025-02-17 12:15:01 +01:00
parent 5a5f918f71
commit 20716cdd1e
11 changed files with 71 additions and 140 deletions

View file

@ -12,17 +12,7 @@ pub fn main() -> anyhow::Result<()> {
compile_simple("fill.frag")?;
compile_simple("fill.vert")?;
compile_simple("tex.vert")?;
compile_tex_frag("tex.frag.spv", false)?;
compile_tex_frag("tex.frag.mult.spv", true)?;
Ok(())
}
fn compile_tex_frag(out: &str, alpha_multiplier: bool) -> anyhow::Result<()> {
let mut opts = CompileOptions::new().unwrap();
if alpha_multiplier {
opts.add_macro_definition("ALPHA_MULTIPLIER", None);
}
compile_shader("tex.frag", out, Some(opts)).with_context(|| out.to_string())?;
compile_simple("tex.frag")?;
Ok(())
}