From 809c58f34d37d8b513ff005ec9c25a3847a70ca7 Mon Sep 17 00:00:00 2001 From: chyyran Date: Tue, 25 Oct 2022 01:50:08 -0400 Subject: [PATCH] reflect: move naga stuff to naga --- librashader-reflect/src/front/naga.rs | 68 +++++++++++++++++++++-- librashader-reflect/src/front/shaderc.rs | 69 ------------------------ 2 files changed, 65 insertions(+), 72 deletions(-) diff --git a/librashader-reflect/src/front/naga.rs b/librashader-reflect/src/front/naga.rs index f48624f..ad0389a 100644 --- a/librashader-reflect/src/front/naga.rs +++ b/librashader-reflect/src/front/naga.rs @@ -18,10 +18,14 @@ pub fn compile_spirv(source: &ShaderSource) -> Result::parse(&loaded) + .unwrap(); + println!("{:#}", ast.compile().unwrap()); + println!("--- naga glsl---"); + println!("{:#}", glsl_out); + println!("--- naga wgsl---"); + println!("{:#}", wgsl) + } } diff --git a/librashader-reflect/src/front/shaderc.rs b/librashader-reflect/src/front/shaderc.rs index 4093969..a7b44ad 100644 --- a/librashader-reflect/src/front/shaderc.rs +++ b/librashader-reflect/src/front/shaderc.rs @@ -123,14 +123,7 @@ pub fn compile_spirv(source: &ShaderSource) -> Result::parse(&loaded) - .unwrap(); - println!("{:#}", ast.compile().unwrap()); - println!("--- naga glsl---"); - println!("{:#}", glsl_out); - println!("--- naga wgsl---"); - println!("{:#}", wgsl) - } }