Basic RNG

This commit is contained in:
2025-01-04 16:51:07 -05:00
parent 52110f4e29
commit 68890ac229
13 changed files with 93 additions and 116 deletions

View File

@ -1,3 +1,5 @@
use std::path::PathBuf;
use crate::flags::ShaderTest;
use crate::slang_build::SlangBuild;
use xshell::Shell;
@ -18,11 +20,11 @@ impl ShaderTest {
let build_dir = build_dir.to_str().unwrap();
// slang-test currently relies on a folder named `tests/` in the current directory
sh.cmd("cp")
.arg("-r")
.arg("shader-tests")
.arg(format!("{build_dir}/tests"))
.run()?;
let tests_dir = PathBuf::from(format!("{build_dir}/tests"));
sh.cmd("rm").arg("-rf").arg(&tests_dir).run()?;
sh.create_dir(&tests_dir)?;
sh.cmd("cp").arg("-r").arg("shader").arg(tests_dir).run()?;
let _dir_guard = sh.push_dir(&build_dir);
sh.cmd(format!("Release/bin/slang-test"))

View File

@ -54,8 +54,8 @@ impl SlangBuild {
.args(["-S", source_dir.to_str().unwrap()])
.args(["-B", build_dir.to_str().unwrap()])
.arg("-DCMAKE_BUILD_TYPE=Release")
// https://github.com/shader-slang/slang/issues/5832#issuecomment-2533324982
.arg("-DCMAKE_SKIP_INSTALL_RULES=ON")
.arg("-DCMAKE_C_FLAGS=-Wno-stringop-overflow")
.arg("-DCMAKE_CXX_FLAGS=-Wno-stringop-overflow")
.run()
.context("slang-build configure")?;