fix shaderstorage in tests

This commit is contained in:
Alex Janka 2024-07-20 17:29:27 +10:00
parent 1406ddc5b3
commit 89090757fd
4 changed files with 15 additions and 6 deletions

View file

@ -105,9 +105,9 @@ mod test {
#[test] #[test]
pub fn load_file() { pub fn load_file() {
let result = load_shader_source( let result = load_shader_source(&librashader_common::ShaderStorage::Path(
"../test/slang-shaders/blurs/shaders/royale/blur3x3-last-pass.slang", "../test/slang-shaders/blurs/shaders/royale/blur3x3-last-pass.slang".into(),
) ))
.unwrap(); .unwrap();
eprintln!("{:#}", result.vertex) eprintln!("{:#}", result.vertex)
} }

View file

@ -761,7 +761,10 @@ mod test {
#[test] #[test]
pub fn test_into() { pub fn test_into() {
let result = ShaderSource::load("../test/basic.slang").unwrap(); let result = ShaderSource::load(&librashader_common::ShaderStorage::Path(
"../test/basic.slang".into(),
))
.unwrap();
let mut uniform_semantics: FastHashMap<String, UniformSemantic> = Default::default(); let mut uniform_semantics: FastHashMap<String, UniformSemantic> = Default::default();
for (_index, param) in result.parameters.iter().enumerate() { for (_index, param) in result.parameters.iter().enumerate() {

View file

@ -120,7 +120,10 @@ mod test {
pub fn test_into() { pub fn test_into() {
// let result = ShaderSource::load("../test/shaders_slang/crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang").unwrap(); // let result = ShaderSource::load("../test/shaders_slang/crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang").unwrap();
// let result = ShaderSource::load("../test/shaders_slang/crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang").unwrap(); // let result = ShaderSource::load("../test/shaders_slang/crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang").unwrap();
let result = ShaderSource::load("../test/basic.slang").unwrap(); let result = ShaderSource::load(&librashader_common::ShaderStorage::Path(
"../test/basic.slang".into(),
))
.unwrap();
let mut uniform_semantics: FastHashMap<String, UniformSemantic> = Default::default(); let mut uniform_semantics: FastHashMap<String, UniformSemantic> = Default::default();

View file

@ -172,7 +172,10 @@ mod test {
#[test] #[test]
pub fn test_into() { pub fn test_into() {
let result = ShaderSource::load("../test/basic.slang").unwrap(); let result = ShaderSource::load(&librashader_common::ShaderStorage::Path(
"../test/basic.slang".into(),
))
.unwrap();
let mut uniform_semantics: FastHashMap<String, UniformSemantic> = Default::default(); let mut uniform_semantics: FastHashMap<String, UniformSemantic> = Default::default();