fix live shader reload
This commit is contained in:
@@ -564,7 +564,7 @@ impl App {
|
|||||||
.ok();
|
.ok();
|
||||||
|
|
||||||
if watcher.is_some()
|
if watcher.is_some()
|
||||||
&& let Ok(paths) = std::fs::read_dir("src/shaders")
|
&& let Ok(paths) = std::fs::read_dir("tape-drive/src/shaders")
|
||||||
{
|
{
|
||||||
for path in paths {
|
for path in paths {
|
||||||
if let Ok(path) = path
|
if let Ok(path) = path
|
||||||
@@ -1740,6 +1740,7 @@ impl App {
|
|||||||
.store(false, std::sync::atomic::Ordering::Relaxed);
|
.store(false, std::sync::atomic::Ordering::Relaxed);
|
||||||
if std::process::Command::new("python3")
|
if std::process::Command::new("python3")
|
||||||
.arg("assemble_trace.py")
|
.arg("assemble_trace.py")
|
||||||
|
.current_dir("tape-drive")
|
||||||
.status()
|
.status()
|
||||||
.is_err()
|
.is_err()
|
||||||
{
|
{
|
||||||
@@ -2590,7 +2591,7 @@ fn relpath(path: &str) -> PathBuf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn read_spirv_words_from_file(name: &str) -> std::io::Result<Vec<u32>> {
|
fn read_spirv_words_from_file(name: &str) -> std::io::Result<Vec<u32>> {
|
||||||
let mut file = std::fs::File::open(format!("shaders_out/{name}"))?;
|
let mut file = std::fs::File::open(format!("tape-drive/shaders_out/{name}"))?;
|
||||||
let mut bytes = vec![];
|
let mut bytes = vec![];
|
||||||
file.read_to_end(&mut bytes).unwrap();
|
file.read_to_end(&mut bytes).unwrap();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user