librashader_reflect/back/
targets.rs1pub trait OutputTarget {
3 type Output;
5}
6
7#[derive(Debug)]
9pub struct GLSL;
10#[derive(Debug)]
12pub struct HLSL;
13#[derive(Debug)]
15pub struct SPIRV;
16#[derive(Debug)]
18pub struct MSL;
19#[derive(Debug)]
24pub struct DXIL;
25
26#[derive(Debug)]
32pub struct WGSL;
33impl OutputTarget for GLSL {
34 type Output = String;
35}
36impl OutputTarget for HLSL {
37 type Output = String;
38}
39impl OutputTarget for WGSL {
40 type Output = String;
41}
42impl OutputTarget for MSL {
43 type Output = String;
44}
45impl OutputTarget for SPIRV {
46 type Output = Vec<u32>;
47}
48
49#[cfg(test)]
50mod test {
51 use crate::back::targets::GLSL;
52 use crate::back::FromCompilation;
53 use crate::front::SpirvCompilation;
54 #[allow(dead_code)]
55 pub fn test_compile(value: SpirvCompilation) {
56 let _x = GLSL::from_compilation(value).unwrap();
57 }
58}