Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 13 additions & 19 deletions examples/runners/ash/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ use std::{
ffi::{CStr, CString},
fs::File,
ops::Drop,
path::PathBuf,
sync::mpsc::{sync_channel, TryRecvError, TrySendError},
thread,
};
Expand Down Expand Up @@ -199,24 +198,19 @@ pub fn main() {
}

pub fn compile_shaders() -> Vec<SpvFile> {
let spv_paths: Vec<PathBuf> =
vec![
SpirvBuilder::new("examples/shaders/sky-shader", "spirv-unknown-vulkan1.1")
.print_metadata(MetadataPrintout::None)
.build()
.unwrap()
.module
.unwrap_single()
.to_path_buf(),
];
let mut spv_files = Vec::<SpvFile>::with_capacity(spv_paths.len());
for path in spv_paths.iter() {
spv_files.push(SpvFile {
name: path.file_stem().unwrap().to_str().unwrap().to_owned(),
data: read_spv(&mut File::open(path).unwrap()).unwrap(),
});
}
spv_files
let sky_shader_path =
SpirvBuilder::new("examples/shaders/sky-shader", "spirv-unknown-vulkan1.1")
.print_metadata(MetadataPrintout::None)
.build()
.unwrap()
.module
.unwrap_single()
.to_path_buf();
let sky_shader = SpvFile {
name: "sky_shader".to_string(),
data: read_spv(&mut File::open(sky_shader_path).unwrap()).unwrap(),
};
vec![sky_shader]
}

#[derive(Debug)]
Expand Down