parent
d1c3a5f562
commit
903f1a349d
@ -1,345 +1,345 @@
|
|||||||
use color_backtrace;
|
//use color_backtrace;
|
||||||
use difference::{Changeset, Difference};
|
//use difference::{Changeset, Difference};
|
||||||
use shade_runner::*;
|
//use shade_runner::*;
|
||||||
use std::borrow::Cow;
|
//use std::borrow::Cow;
|
||||||
use std::collections::HashMap;
|
//use std::collections::HashMap;
|
||||||
use std::path::{Path, PathBuf};
|
//use std::path::{Path, PathBuf};
|
||||||
use vulkano::descriptor::descriptor::*;
|
//use vulkano::descriptor::descriptor::*;
|
||||||
use vulkano::descriptor::pipeline_layout::{PipelineLayoutDesc, PipelineLayoutDescPcRange};
|
//use vulkano::descriptor::pipeline_layout::{PipelineLayoutDesc, PipelineLayoutDescPcRange};
|
||||||
use vulkano::format::*;
|
//use vulkano::format::*;
|
||||||
use vulkano::pipeline::shader::ShaderInterfaceDefEntry;
|
//use vulkano::pipeline::shader::ShaderInterfaceDefEntry;
|
||||||
|
//
|
||||||
fn setup() {
|
//fn setup() {
|
||||||
color_backtrace::install();
|
// color_backtrace::install();
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
fn difference(e: &str, t: &str) -> String {
|
//fn difference(e: &str, t: &str) -> String {
|
||||||
let diffs = Changeset::new(&e, &t, "");
|
// let diffs = Changeset::new(&e, &t, "");
|
||||||
diffs
|
// diffs
|
||||||
.diffs
|
// .diffs
|
||||||
.iter()
|
// .iter()
|
||||||
.filter(|d| match d {
|
// .filter(|d| match d {
|
||||||
Difference::Add(_) => true,
|
// Difference::Add(_) => true,
|
||||||
Difference::Rem(_) => true,
|
// Difference::Rem(_) => true,
|
||||||
_ => false,
|
// _ => false,
|
||||||
})
|
// })
|
||||||
.map(|d| match d {
|
// .map(|d| match d {
|
||||||
Difference::Add(a) => format!("add: {}", a),
|
// Difference::Add(a) => format!("add: {}", a),
|
||||||
Difference::Rem(a) => format!("remove: {}", a),
|
// Difference::Rem(a) => format!("remove: {}", a),
|
||||||
_ => "".to_string(),
|
// _ => "".to_string(),
|
||||||
})
|
// })
|
||||||
.collect::<Vec<String>>()
|
// .collect::<Vec<String>>()
|
||||||
.join("\n")
|
// .join("\n")
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
fn descriptor_layout<T>(desc: &T) -> String
|
//fn descriptor_layout<T>(desc: &T) -> String
|
||||||
where
|
//where
|
||||||
T: PipelineLayoutDesc,
|
// T: PipelineLayoutDesc,
|
||||||
{
|
//{
|
||||||
let num_sets = desc.num_sets();
|
// let num_sets = desc.num_sets();
|
||||||
let mut r = format!("{:?}", num_sets);
|
// let mut r = format!("{:?}", num_sets);
|
||||||
for n in 0..num_sets {
|
// for n in 0..num_sets {
|
||||||
let num_bindings = desc.num_bindings_in_set(n);
|
// let num_bindings = desc.num_bindings_in_set(n);
|
||||||
r = format!("{:?}{:?}", r, num_bindings);
|
// r = format!("{:?}{:?}", r, num_bindings);
|
||||||
for b in num_bindings {
|
// for b in num_bindings {
|
||||||
r = format!("{:?}{:?}", r, desc.descriptor(n, b));
|
// r = format!("{:?}{:?}", r, desc.descriptor(n, b));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
let num_push_constants = desc.num_push_constants_ranges();
|
// let num_push_constants = desc.num_push_constants_ranges();
|
||||||
r = format!("{:?}{:?}", r, num_push_constants);
|
// r = format!("{:?}{:?}", r, num_push_constants);
|
||||||
for i in 0..num_push_constants {
|
// for i in 0..num_push_constants {
|
||||||
r = format!("{:?}{:?}", r, desc.push_constants_range(i));
|
// r = format!("{:?}{:?}", r, desc.push_constants_range(i));
|
||||||
}
|
// }
|
||||||
r
|
// r
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
fn parse<T>(vertex: T, fragment: T) -> shade_runner::Entry
|
//fn parse<T>(vertex: T, fragment: T) -> shade_runner::Entry
|
||||||
where
|
//where
|
||||||
T: AsRef<Path>,
|
// T: AsRef<Path>,
|
||||||
{
|
//{
|
||||||
let project_root = std::env::current_dir().expect("failed to get root directory");
|
// let project_root = std::env::current_dir().expect("failed to get root directory");
|
||||||
let mut path = project_root.clone();
|
// let mut path = project_root.clone();
|
||||||
path.push(PathBuf::from("tests/shaders/"));
|
// path.push(PathBuf::from("tests/shaders/"));
|
||||||
let mut vertex_path = path.clone();
|
// let mut vertex_path = path.clone();
|
||||||
vertex_path.push(vertex);
|
// vertex_path.push(vertex);
|
||||||
let mut fragment_path = path.clone();
|
// let mut fragment_path = path.clone();
|
||||||
fragment_path.push(fragment);
|
// fragment_path.push(fragment);
|
||||||
let shader = shade_runner::load(vertex_path, fragment_path).expect("Failed to compile");
|
// let shader = shade_runner::load(vertex_path, fragment_path).expect("Failed to compile");
|
||||||
shade_runner::parse(&shader).unwrap()
|
// shade_runner::parse(&shader).unwrap()
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
fn do_test<T>(a: &T, b: &T)
|
//fn do_test<T>(a: &T, b: &T)
|
||||||
where
|
//where
|
||||||
T: std::fmt::Debug,
|
// T: std::fmt::Debug,
|
||||||
{
|
//{
|
||||||
let a = format!("{:?}", a);
|
// let a = format!("{:?}", a);
|
||||||
let b = format!("{:?}", b);
|
// let b = format!("{:?}", b);
|
||||||
assert_eq!(&a, &b, "\n\nDifference: {}", difference(&a, &b));
|
// assert_eq!(&a, &b, "\n\nDifference: {}", difference(&a, &b));
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
#[test]
|
//#[test]
|
||||||
fn test_shade1() {
|
//fn test_shade1() {
|
||||||
setup();
|
// setup();
|
||||||
let target = Entry {
|
// let target = Entry {
|
||||||
compute_layout: Default::default(),
|
// compute_layout: Default::default(),
|
||||||
frag_input: FragInput { inputs: Vec::new() },
|
// frag_input: FragInput { inputs: Vec::new() },
|
||||||
frag_output: FragOutput {
|
// frag_output: FragOutput {
|
||||||
outputs: vec![ShaderInterfaceDefEntry {
|
// outputs: vec![ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32B32A32Sfloat,
|
// format: Format::R32G32B32A32Sfloat,
|
||||||
name: Some(Cow::Borrowed("f_color")),
|
// name: Some(Cow::Borrowed("f_color")),
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
frag_layout: FragLayout {
|
// frag_layout: FragLayout {
|
||||||
layout_data: LayoutData {
|
// layout_data: LayoutData {
|
||||||
num_sets: 0,
|
// num_sets: 0,
|
||||||
num_bindings: HashMap::new(),
|
// num_bindings: HashMap::new(),
|
||||||
descriptions: HashMap::new(),
|
// descriptions: HashMap::new(),
|
||||||
num_constants: 0,
|
// num_constants: 0,
|
||||||
pc_ranges: Vec::new(),
|
// pc_ranges: Vec::new(),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
vert_input: VertInput {
|
// vert_input: VertInput {
|
||||||
inputs: vec![ShaderInterfaceDefEntry {
|
// inputs: vec![ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32Sfloat,
|
// format: Format::R32G32Sfloat,
|
||||||
name: Some(Cow::Borrowed("position")),
|
// name: Some(Cow::Borrowed("position")),
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
vert_output: VertOutput {
|
// vert_output: VertOutput {
|
||||||
outputs: Vec::new(),
|
// outputs: Vec::new(),
|
||||||
},
|
// },
|
||||||
vert_layout: VertLayout {
|
// vert_layout: VertLayout {
|
||||||
layout_data: LayoutData {
|
// layout_data: LayoutData {
|
||||||
num_sets: 0,
|
// num_sets: 0,
|
||||||
num_bindings: HashMap::new(),
|
// num_bindings: HashMap::new(),
|
||||||
descriptions: HashMap::new(),
|
// descriptions: HashMap::new(),
|
||||||
num_constants: 0,
|
// num_constants: 0,
|
||||||
pc_ranges: Vec::new(),
|
// pc_ranges: Vec::new(),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
let entry = parse("vert1.glsl", "frag1.glsl");
|
// let entry = parse("vert1.glsl", "frag1.glsl");
|
||||||
do_test(&entry, &target);
|
// do_test(&entry, &target);
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
#[test]
|
//#[test]
|
||||||
fn test_shade2() {
|
//fn test_shade2() {
|
||||||
setup();
|
// setup();
|
||||||
let target = Entry {
|
// let target = Entry {
|
||||||
compute_layout: Default::default(),
|
// compute_layout: Default::default(),
|
||||||
frag_input: FragInput {
|
// frag_input: FragInput {
|
||||||
inputs: vec![
|
// inputs: vec![
|
||||||
ShaderInterfaceDefEntry {
|
// ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32B32A32Sfloat,
|
// format: Format::R32G32B32A32Sfloat,
|
||||||
name: Some(Cow::Borrowed("cool")),
|
// name: Some(Cow::Borrowed("cool")),
|
||||||
},
|
// },
|
||||||
ShaderInterfaceDefEntry {
|
// ShaderInterfaceDefEntry {
|
||||||
location: 1..2,
|
// location: 1..2,
|
||||||
format: Format::R32G32Sfloat,
|
// format: Format::R32G32Sfloat,
|
||||||
name: Some(Cow::Borrowed("yep")),
|
// name: Some(Cow::Borrowed("yep")),
|
||||||
},
|
// },
|
||||||
ShaderInterfaceDefEntry {
|
// ShaderInterfaceDefEntry {
|
||||||
location: 2..3,
|
// location: 2..3,
|
||||||
format: Format::R32Sfloat,
|
// format: Format::R32Sfloat,
|
||||||
name: Some(Cow::Borrowed("monkey")),
|
// name: Some(Cow::Borrowed("monkey")),
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
frag_output: FragOutput {
|
// frag_output: FragOutput {
|
||||||
outputs: vec![ShaderInterfaceDefEntry {
|
// outputs: vec![ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32B32A32Sfloat,
|
// format: Format::R32G32B32A32Sfloat,
|
||||||
name: Some(Cow::Borrowed("f_color")),
|
// name: Some(Cow::Borrowed("f_color")),
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
frag_layout: FragLayout {
|
// frag_layout: FragLayout {
|
||||||
layout_data: LayoutData {
|
// layout_data: LayoutData {
|
||||||
num_sets: 0,
|
// num_sets: 0,
|
||||||
num_bindings: HashMap::new(),
|
// num_bindings: HashMap::new(),
|
||||||
descriptions: HashMap::new(),
|
// descriptions: HashMap::new(),
|
||||||
num_constants: 0,
|
// num_constants: 0,
|
||||||
pc_ranges: Vec::new(),
|
// pc_ranges: Vec::new(),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
vert_input: VertInput {
|
// vert_input: VertInput {
|
||||||
inputs: vec![ShaderInterfaceDefEntry {
|
// inputs: vec![ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32Sfloat,
|
// format: Format::R32G32Sfloat,
|
||||||
name: Some(Cow::Borrowed("position")),
|
// name: Some(Cow::Borrowed("position")),
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
vert_output: VertOutput {
|
// vert_output: VertOutput {
|
||||||
outputs: vec![
|
// outputs: vec![
|
||||||
ShaderInterfaceDefEntry {
|
// ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32B32A32Sfloat,
|
// format: Format::R32G32B32A32Sfloat,
|
||||||
name: Some(Cow::Borrowed("cool")),
|
// name: Some(Cow::Borrowed("cool")),
|
||||||
},
|
// },
|
||||||
ShaderInterfaceDefEntry {
|
// ShaderInterfaceDefEntry {
|
||||||
location: 1..2,
|
// location: 1..2,
|
||||||
format: Format::R32G32Sfloat,
|
// format: Format::R32G32Sfloat,
|
||||||
name: Some(Cow::Borrowed("yep")),
|
// name: Some(Cow::Borrowed("yep")),
|
||||||
},
|
// },
|
||||||
ShaderInterfaceDefEntry {
|
// ShaderInterfaceDefEntry {
|
||||||
location: 2..3,
|
// location: 2..3,
|
||||||
format: Format::R32Sfloat,
|
// format: Format::R32Sfloat,
|
||||||
name: Some(Cow::Borrowed("monkey")),
|
// name: Some(Cow::Borrowed("monkey")),
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
vert_layout: VertLayout {
|
// vert_layout: VertLayout {
|
||||||
layout_data: LayoutData {
|
// layout_data: LayoutData {
|
||||||
num_sets: 0,
|
// num_sets: 0,
|
||||||
num_bindings: HashMap::new(),
|
// num_bindings: HashMap::new(),
|
||||||
descriptions: HashMap::new(),
|
// descriptions: HashMap::new(),
|
||||||
num_constants: 0,
|
// num_constants: 0,
|
||||||
pc_ranges: Vec::new(),
|
// pc_ranges: Vec::new(),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
let entry = parse("vert2.glsl", "frag2.glsl");
|
// let entry = parse("vert2.glsl", "frag2.glsl");
|
||||||
do_test(&entry, &target);
|
// do_test(&entry, &target);
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
#[test]
|
//#[test]
|
||||||
fn test_shade3() {
|
//fn test_shade3() {
|
||||||
setup();
|
// setup();
|
||||||
let target = Entry {
|
// let target = Entry {
|
||||||
compute_layout: Default::default(),
|
// compute_layout: Default::default(),
|
||||||
frag_input: FragInput { inputs: Vec::new() },
|
// frag_input: FragInput { inputs: Vec::new() },
|
||||||
frag_output: FragOutput {
|
// frag_output: FragOutput {
|
||||||
outputs: vec![ShaderInterfaceDefEntry {
|
// outputs: vec![ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32B32A32Sfloat,
|
// format: Format::R32G32B32A32Sfloat,
|
||||||
name: Some(Cow::Borrowed("f_color")),
|
// name: Some(Cow::Borrowed("f_color")),
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
frag_layout: FragLayout {
|
// frag_layout: FragLayout {
|
||||||
layout_data: LayoutData {
|
// layout_data: LayoutData {
|
||||||
num_sets: 1,
|
// num_sets: 1,
|
||||||
num_bindings: vec![(0, 1)].into_iter().collect(),
|
// num_bindings: vec![(0, 1)].into_iter().collect(),
|
||||||
descriptions: vec![(
|
// descriptions: vec![(
|
||||||
0,
|
// 0,
|
||||||
vec![(
|
// vec![(
|
||||||
0,
|
// 0,
|
||||||
DescriptorDesc {
|
// DescriptorDesc {
|
||||||
ty: DescriptorDescTy::CombinedImageSampler(DescriptorImageDesc {
|
// ty: DescriptorDescTy::CombinedImageSampler(DescriptorImageDesc {
|
||||||
sampled: true,
|
// sampled: true,
|
||||||
dimensions: DescriptorImageDescDimensions::TwoDimensional,
|
// dimensions: DescriptorImageDescDimensions::TwoDimensional,
|
||||||
format: None,
|
// format: None,
|
||||||
multisampled: false,
|
// multisampled: false,
|
||||||
array_layers: DescriptorImageDescArray::NonArrayed,
|
// array_layers: DescriptorImageDescArray::NonArrayed,
|
||||||
}),
|
// }),
|
||||||
array_count: 1,
|
// array_count: 1,
|
||||||
stages: ShaderStages {
|
// stages: ShaderStages {
|
||||||
fragment: true,
|
// fragment: true,
|
||||||
..ShaderStages::none()
|
// ..ShaderStages::none()
|
||||||
},
|
// },
|
||||||
readonly: true,
|
// readonly: true,
|
||||||
},
|
// },
|
||||||
)]
|
// )]
|
||||||
.into_iter()
|
// .into_iter()
|
||||||
.collect(),
|
// .collect(),
|
||||||
)]
|
// )]
|
||||||
.into_iter()
|
// .into_iter()
|
||||||
.collect(),
|
// .collect(),
|
||||||
num_constants: 0,
|
// num_constants: 0,
|
||||||
pc_ranges: Vec::new(),
|
// pc_ranges: Vec::new(),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
vert_input: VertInput {
|
// vert_input: VertInput {
|
||||||
inputs: vec![ShaderInterfaceDefEntry {
|
// inputs: vec![ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32Sfloat,
|
// format: Format::R32G32Sfloat,
|
||||||
name: Some(Cow::Borrowed("position")),
|
// name: Some(Cow::Borrowed("position")),
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
vert_output: VertOutput {
|
// vert_output: VertOutput {
|
||||||
outputs: Vec::new(),
|
// outputs: Vec::new(),
|
||||||
},
|
// },
|
||||||
vert_layout: VertLayout {
|
// vert_layout: VertLayout {
|
||||||
layout_data: LayoutData {
|
// layout_data: LayoutData {
|
||||||
num_sets: 0,
|
// num_sets: 0,
|
||||||
num_bindings: HashMap::new(),
|
// num_bindings: HashMap::new(),
|
||||||
descriptions: HashMap::new(),
|
// descriptions: HashMap::new(),
|
||||||
num_constants: 0,
|
// num_constants: 0,
|
||||||
pc_ranges: Vec::new(),
|
// pc_ranges: Vec::new(),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
let entry = parse("vert3.glsl", "frag3.glsl");
|
// let entry = parse("vert3.glsl", "frag3.glsl");
|
||||||
do_test(&entry.frag_input, &target.frag_input);
|
// do_test(&entry.frag_input, &target.frag_input);
|
||||||
do_test(&entry.frag_output, &target.frag_output);
|
// do_test(&entry.frag_output, &target.frag_output);
|
||||||
do_test(&entry.vert_input, &target.vert_input);
|
// do_test(&entry.vert_input, &target.vert_input);
|
||||||
do_test(&entry.vert_output, &target.vert_output);
|
// do_test(&entry.vert_output, &target.vert_output);
|
||||||
do_test(
|
// do_test(
|
||||||
&descriptor_layout(&entry.frag_layout),
|
// &descriptor_layout(&entry.frag_layout),
|
||||||
&descriptor_layout(&target.frag_layout),
|
// &descriptor_layout(&target.frag_layout),
|
||||||
);
|
// );
|
||||||
do_test(
|
// do_test(
|
||||||
&descriptor_layout(&entry.vert_layout),
|
// &descriptor_layout(&entry.vert_layout),
|
||||||
&descriptor_layout(&target.vert_layout),
|
// &descriptor_layout(&target.vert_layout),
|
||||||
);
|
// );
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
#[test]
|
//#[test]
|
||||||
fn test_shade4() {
|
//fn test_shade4() {
|
||||||
setup();
|
// setup();
|
||||||
let target = Entry {
|
// let target = Entry {
|
||||||
compute_layout: Default::default(),
|
// compute_layout: Default::default(),
|
||||||
frag_input: FragInput { inputs: Vec::new() },
|
// frag_input: FragInput { inputs: Vec::new() },
|
||||||
frag_output: FragOutput {
|
// frag_output: FragOutput {
|
||||||
outputs: vec![ShaderInterfaceDefEntry {
|
// outputs: vec![ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32B32A32Sfloat,
|
// format: Format::R32G32B32A32Sfloat,
|
||||||
name: Some(Cow::Borrowed("f_color")),
|
// name: Some(Cow::Borrowed("f_color")),
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
frag_layout: FragLayout {
|
// frag_layout: FragLayout {
|
||||||
layout_data: LayoutData {
|
// layout_data: LayoutData {
|
||||||
num_sets: 0,
|
// num_sets: 0,
|
||||||
num_bindings: HashMap::new(),
|
// num_bindings: HashMap::new(),
|
||||||
descriptions: HashMap::new(),
|
// descriptions: HashMap::new(),
|
||||||
num_constants: 1,
|
// num_constants: 1,
|
||||||
pc_ranges: vec![PipelineLayoutDescPcRange {
|
// pc_ranges: vec![PipelineLayoutDescPcRange {
|
||||||
offset: 0,
|
// offset: 0,
|
||||||
size: 16,
|
// size: 16,
|
||||||
stages: ShaderStages {
|
// stages: ShaderStages {
|
||||||
fragment: true,
|
// fragment: true,
|
||||||
..ShaderStages::none()
|
// ..ShaderStages::none()
|
||||||
},
|
// },
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
vert_input: VertInput {
|
// vert_input: VertInput {
|
||||||
inputs: vec![ShaderInterfaceDefEntry {
|
// inputs: vec![ShaderInterfaceDefEntry {
|
||||||
location: 0..1,
|
// location: 0..1,
|
||||||
format: Format::R32G32Sfloat,
|
// format: Format::R32G32Sfloat,
|
||||||
name: Some(Cow::Borrowed("position")),
|
// name: Some(Cow::Borrowed("position")),
|
||||||
}],
|
// }],
|
||||||
},
|
// },
|
||||||
vert_output: VertOutput {
|
// vert_output: VertOutput {
|
||||||
outputs: Vec::new(),
|
// outputs: Vec::new(),
|
||||||
},
|
// },
|
||||||
vert_layout: VertLayout {
|
// vert_layout: VertLayout {
|
||||||
layout_data: LayoutData {
|
// layout_data: LayoutData {
|
||||||
num_sets: 0,
|
// num_sets: 0,
|
||||||
num_bindings: HashMap::new(),
|
// num_bindings: HashMap::new(),
|
||||||
descriptions: HashMap::new(),
|
// descriptions: HashMap::new(),
|
||||||
num_constants: 0,
|
// num_constants: 0,
|
||||||
pc_ranges: Vec::new(),
|
// pc_ranges: Vec::new(),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
let entry = parse("vert4.glsl", "frag4.glsl");
|
// let entry = parse("vert4.glsl", "frag4.glsl");
|
||||||
do_test(&entry.frag_input, &target.frag_input);
|
// do_test(&entry.frag_input, &target.frag_input);
|
||||||
do_test(&entry.frag_output, &target.frag_output);
|
// do_test(&entry.frag_output, &target.frag_output);
|
||||||
do_test(&entry.vert_input, &target.vert_input);
|
// do_test(&entry.vert_input, &target.vert_input);
|
||||||
do_test(&entry.vert_output, &target.vert_output);
|
// do_test(&entry.vert_output, &target.vert_output);
|
||||||
do_test(
|
// do_test(
|
||||||
&descriptor_layout(&entry.frag_layout),
|
// &descriptor_layout(&entry.frag_layout),
|
||||||
&descriptor_layout(&target.frag_layout),
|
// &descriptor_layout(&target.frag_layout),
|
||||||
);
|
// );
|
||||||
}
|
//}
|
||||||
|
Loading…
Reference in new issue