fix directory

This commit is contained in:
2025-12-20 00:13:32 +00:00
parent d34b6eef07
commit 75bc063c8f
2 changed files with 66 additions and 66 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ import re
SHADERS_DIR = "shaders_out"
TARGET_ENV = "vulkan1.3"
shutil.rmtree(SHADERS_DIR)
if os.path.isdir(SHADERS_DIR):
shutil.rmtree(SHADERS_DIR)
os.mkdir(SHADERS_DIR)
normal_shaders = [
+29 -30
View File
@@ -1,4 +1,3 @@
#![feature(variant_count)]
#![feature(portable_simd)]
#![feature(mpmc_channel)]
@@ -560,10 +559,10 @@ impl App {
notify::EventKind::Modify(notify::event::ModifyKind::Data(_)) => {
info!("event: {:?}", event);
watcher_glsl_changed.store(true, std::sync::atomic::Ordering::SeqCst);
},
_ => {},
}
},
_ => {}
}
}
Err(e) => error!("watch error: {:?}", e),
},
)
@@ -1025,16 +1024,16 @@ impl ApplicationHandler for App {
match &event {
WindowEvent::CloseRequested => {
event_loop.exit();
},
}
WindowEvent::Resized(_) => {
rcx.recreate_swapchain = true;
},
}
WindowEvent::ScaleFactorChanged { .. } => {
rcx.recreate_swapchain = true;
},
}
WindowEvent::DroppedFile(_file) => {
todo!()
},
}
WindowEvent::MouseInput {
device_id: d,
state: s,
@@ -1045,7 +1044,7 @@ impl ApplicationHandler for App {
if b == &MouseButton::Right {
self.cstate.looking = s == &ElementState::Pressed;
}
},
}
WindowEvent::KeyboardInput {
device_id: _,
event: input,
@@ -1053,19 +1052,19 @@ impl ApplicationHandler for App {
} => match input.physical_key {
PhysicalKey::Code(KeyCode::KeyW) => {
self.cstate.keys.w = input.state == ElementState::Pressed;
},
}
PhysicalKey::Code(KeyCode::KeyS) => {
self.cstate.keys.s = input.state == ElementState::Pressed;
},
}
PhysicalKey::Code(KeyCode::KeyA) => {
self.cstate.keys.a = input.state == ElementState::Pressed;
},
}
PhysicalKey::Code(KeyCode::KeyD) => {
self.cstate.keys.d = input.state == ElementState::Pressed;
},
}
PhysicalKey::Code(KeyCode::ShiftLeft) => {
self.cstate.looking = input.state == ElementState::Pressed;
},
}
PhysicalKey::Code(KeyCode::Space) => {
if input.state == ElementState::Pressed {
self.thread_work_creation
@@ -1087,18 +1086,18 @@ impl ApplicationHandler for App {
))
.unwrap();
}
},
}
PhysicalKey::Code(KeyCode::KeyG) => {
if input.state == ElementState::Pressed {
self.draw_gui = !self.draw_gui;
}
},
_ => {},
}
_ => {}
},
WindowEvent::RedrawRequested => {
self.redraw(rcx);
},
_ => {},
}
_ => {}
}
}
@@ -1537,9 +1536,9 @@ impl App {
} else {
self.gstate.csg[index as usize] = csg;
}
},
WorkComplete::GetPushConstants(..) => {},
WorkComplete::RecompilePipelines(..) => {},
}
WorkComplete::GetPushConstants(..) => {}
WorkComplete::RecompilePipelines(..) => {}
}
}
@@ -1706,7 +1705,7 @@ impl App {
match work {
WorkComplete::RecompilePipelines(_index) => {
csg_left -= 1;
},
}
other => work_for_later.push(other),
}
}
@@ -1858,7 +1857,7 @@ impl App {
match work {
WorkComplete::RecompilePipelines(_index) => {
csg_left -= 1;
},
}
other => work_for_later.push(other),
}
}
@@ -1873,7 +1872,7 @@ impl App {
Err(VulkanError::OutOfDate) => {
rcx.recreate_swapchain = true;
return;
},
}
Err(e) => panic!("Failed to acquire next image: {e}"),
};
@@ -1976,7 +1975,7 @@ impl App {
Some(future.boxed())
};
push_constants_left -= 1;
},
}
other => work_for_later.push(other),
}
}
@@ -2051,20 +2050,20 @@ impl App {
match future.map_err(Validated::unwrap) {
Ok(future) => {
rcx.previous_frame_end[image_index] = Some(future);
},
}
Err(VulkanError::OutOfDate) => {
rcx.recreate_swapchain = true;
rcx.previous_frame_end[image_index] = None;
},
}
Err(e) => {
error!("Failed to flush future: {e:?}");
rcx.previous_frame_end[image_index] = None;
},
}
}
for work in self.thread_work_completion.try_iter() {
match work {
WorkComplete::GetPushConstants(..) => {},
WorkComplete::GetPushConstants(..) => {}
other => work_for_later.push(other),
}
}