fix shaderstorage in tests

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

View file

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

View file

@ -754,7 +754,10 @@ mod test {
#[test]
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();
for (_index, param) in result.parameters.iter().enumerate() {

View file

@ -120,7 +120,10 @@ mod test {
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/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();

View file

@ -170,7 +170,10 @@ mod test {
#[test]
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();