pub trait OutputTarget {
type Output;
}
#[derive(Debug)]
pub struct GLSL;
#[derive(Debug)]
pub struct HLSL;
#[derive(Debug)]
pub struct SPIRV;
#[derive(Debug)]
pub struct MSL;
#[derive(Debug)]
pub struct DXIL;
#[derive(Debug)]
pub struct WGSL;
impl OutputTarget for GLSL {
type Output = String;
}
impl OutputTarget for HLSL {
type Output = String;
}
impl OutputTarget for WGSL {
type Output = String;
}
impl OutputTarget for MSL {
type Output = String;
}
impl OutputTarget for SPIRV {
type Output = Vec<u32>;
}
#[cfg(test)]
mod test {
use crate::back::targets::GLSL;
use crate::back::FromCompilation;
use crate::front::SpirvCompilation;
#[allow(dead_code)]
pub fn test_compile(value: SpirvCompilation) {
let _x = GLSL::from_compilation(value).unwrap();
}
}