no more warnings

This commit is contained in:
2021-10-24 19:46:18 +02:00
parent c8d4da62b6
commit f0c9ed5e51

View File

@@ -51,6 +51,7 @@ fn _shader_module_from_file(device: Arc<Device>, path: &str) -> Arc<ShaderModule
}
}
#[allow(dead_code)]
fn matches_extension(path: &PathBuf, extensions: &Vec<&str>) -> bool {
if let Some(Some(path_extension)) = path.extension().map(|e| e.to_str()) {
for extension in extensions {
@@ -60,6 +61,7 @@ fn matches_extension(path: &PathBuf, extensions: &Vec<&str>) -> bool {
return false;
}
#[allow(dead_code)]
fn compile_shaders() -> io::Result<()> {
for file_maybe in std::fs::read_dir("./shaders")? {
let path = file_maybe?.path();
@@ -93,6 +95,7 @@ impl DefaultShader {
fn create_pipeline(device: Arc<Device>, render_pass: RP) -> GP {
let sub_pass = Subpass::from(render_pass.clone(), 0).unwrap();
/*
#[cfg(debug_assertions)]
{
println!("Compiling shaders...");
@@ -100,7 +103,6 @@ impl DefaultShader {
}
unsafe {
/*
static ENTRY_NAME: [u8; 5usize] = [109u8, 97u8, 105u8, 110u8, 0];
let entry_name_c = std::ffi::CStr::from_ptr(ENTRY_NAME.as_ptr() as *const _);
@@ -133,7 +135,7 @@ impl DefaultShader {
.render_pass(sub_pass.clone())
.build(device.clone())
.unwrap())
}
//}
}
}
@@ -143,6 +145,7 @@ impl Drawcall for DefaultShader {
let game_object = &game_objects[i];
let mesh = &game_data.meshes[game_object.mesh_index];
#[allow(irrefutable_let_patterns)]
if let PushConstantType::MeshPC(mesh_push) = game_object.get_push_constants() {
builder
.bind_pipeline_graphics(self.pipeline.clone())
@@ -281,6 +284,7 @@ impl TextShader {
fn create_pipeline(device: Arc<Device>, render_pass: RP) -> GP {
let sub_pass = Subpass::from(render_pass.clone(), 0).unwrap();
/*
#[cfg(debug_assertions)]
{
println!("Compiling shaders...");
@@ -288,7 +292,6 @@ impl TextShader {
}
unsafe {
/*
static ENTRY_NAME: [u8; 5usize] = [109u8, 97u8, 105u8, 110u8, 0];
let entry_name_c = std::ffi::CStr::from_ptr(ENTRY_NAME.as_ptr() as *const _);
@@ -323,12 +326,8 @@ impl TextShader {
.build(device.clone())
.unwrap());
// println!("{:?}", gp.descriptor(0, 0).unwrap().ty);
// println!("{:?}", gp.descriptor(0, 1).unwrap().ty);
// println!("{:?}", gp.descriptor(0, 2).unwrap().ty); // TODO: Why does this exist?
gp
}
//}
}
}