2022-12-06 17:01:21 +11:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2022-12-06 17:38:21 +11:00
|
|
|
#![feature(let_chains)]
|
2022-12-25 17:18:11 +11:00
|
|
|
#![feature(strict_provenance)]
|
2022-12-06 13:01:15 +11:00
|
|
|
|
2022-12-22 13:39:31 +11:00
|
|
|
mod draw_quad;
|
2022-12-06 17:01:21 +11:00
|
|
|
mod filter_chain;
|
|
|
|
mod filter_pass;
|
2022-12-07 18:05:10 +11:00
|
|
|
mod framebuffer;
|
2023-01-13 17:19:41 +11:00
|
|
|
#[cfg(test)]
|
2023-01-10 14:54:54 +11:00
|
|
|
mod hello_triangle;
|
2022-12-22 13:39:31 +11:00
|
|
|
mod luts;
|
2023-01-13 17:48:04 +11:00
|
|
|
mod parameters;
|
|
|
|
mod queue_selection;
|
2023-01-11 11:36:07 +11:00
|
|
|
mod render_target;
|
2022-12-22 14:03:38 +11:00
|
|
|
mod samplers;
|
2022-12-22 17:30:14 +11:00
|
|
|
mod texture;
|
2022-12-25 17:28:49 +11:00
|
|
|
mod ubo_ring;
|
2023-01-10 14:54:54 +11:00
|
|
|
mod util;
|
|
|
|
mod vulkan_primitives;
|
|
|
|
mod vulkan_state;
|
2023-01-13 17:19:41 +11:00
|
|
|
|
2023-01-13 19:19:58 +11:00
|
|
|
pub use filter_chain::FilterChain;
|
|
|
|
pub use filter_chain::VulkanDevice;
|
2023-01-13 18:32:21 +11:00
|
|
|
pub use filter_chain::VulkanInstance;
|
2023-01-13 17:48:04 +11:00
|
|
|
pub use texture::VulkanImage;
|
2023-01-13 17:19:41 +11:00
|
|
|
|
|
|
|
pub mod error;
|
|
|
|
pub mod options;
|
2022-12-06 13:01:15 +11:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use super::*;
|
2023-01-13 19:19:58 +11:00
|
|
|
use crate::filter_chain::FilterChain;
|
2023-01-03 16:55:35 +11:00
|
|
|
use crate::hello_triangle::vulkan_base::VulkanBase;
|
|
|
|
|
2022-12-06 13:01:15 +11:00
|
|
|
#[test]
|
|
|
|
fn triangle_vk() {
|
2023-01-10 14:54:54 +11:00
|
|
|
let entry = unsafe { ash::Entry::load().unwrap() };
|
2023-01-03 16:55:35 +11:00
|
|
|
let base = VulkanBase::new(entry).unwrap();
|
2023-01-13 16:07:03 +11:00
|
|
|
dbg!("finished");
|
2023-01-13 19:19:58 +11:00
|
|
|
let mut filter = FilterChain::load_from_path(
|
2023-01-03 16:55:35 +11:00
|
|
|
&base,
|
2023-01-12 16:00:45 +11:00
|
|
|
// "../test/slang-shaders/border/gameboy-player/gameboy-player-crt-royale.slangp",
|
|
|
|
"../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp",
|
2023-01-13 16:07:03 +11:00
|
|
|
// "../test/basic.slangp",
|
2023-01-10 14:54:54 +11:00
|
|
|
None,
|
|
|
|
)
|
|
|
|
.unwrap();
|
2023-01-03 16:55:35 +11:00
|
|
|
|
|
|
|
crate::hello_triangle::main(base, filter)
|
|
|
|
|
|
|
|
// let base = hello_triangle_old::ExampleBase::new(900, 600);
|
|
|
|
// // let mut filter = FilterChainVulkan::load_from_path(
|
|
|
|
// // (base.device.clone(), base.present_queue.clone(), base.device_memory_properties.clone()),
|
|
|
|
// // "../test/slang-shaders/border/gameboy-player/gameboy-player-crt-royale.slangp",
|
|
|
|
// // None
|
|
|
|
// // )
|
|
|
|
//
|
2022-12-22 13:13:35 +11:00
|
|
|
// let mut filter = FilterChainVulkan::load_from_path(
|
2023-01-03 16:55:35 +11:00
|
|
|
// (
|
|
|
|
// base.device.clone(),
|
|
|
|
// base.present_queue.clone(),
|
|
|
|
// base.device_memory_properties.clone(),
|
|
|
|
// ),
|
2022-12-22 13:13:35 +11:00
|
|
|
// "../test/slang-shaders/border/gameboy-player/gameboy-player-crt-royale.slangp",
|
2023-01-03 16:55:35 +11:00
|
|
|
// None,
|
2022-12-22 13:13:35 +11:00
|
|
|
// )
|
2023-01-03 16:55:35 +11:00
|
|
|
// // FilterChain::load_from_path("../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", None)
|
|
|
|
// .unwrap();
|
|
|
|
// hello_triangle_old::main(base, filter);
|
2022-12-06 13:01:15 +11:00
|
|
|
}
|
|
|
|
}
|