2023-02-16 16:39:36 +11:00
|
|
|
mod hello_triangle;
|
|
|
|
|
|
|
|
use hello_triangle::vulkan_base::VulkanBase;
|
|
|
|
use librashader_runtime_vk::options::FilterChainOptionsVulkan;
|
2023-02-17 09:33:47 +11:00
|
|
|
use librashader_runtime_vk::FilterChainVulkan;
|
2023-02-16 16:39:36 +11:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn triangle_vk() {
|
|
|
|
let entry = unsafe { ash::Entry::load().unwrap() };
|
|
|
|
let base = VulkanBase::new(entry).unwrap();
|
|
|
|
|
2023-02-17 09:38:00 +11:00
|
|
|
unsafe {
|
|
|
|
let filter = FilterChainVulkan::load_from_path(
|
2024-02-03 18:40:32 +11:00
|
|
|
"../test/shaders_slang/crt/crt-royale.slangp",
|
|
|
|
// "../test/Mega_Bezel_Packs/Duimon-Mega-Bezel/Presets/Advanced/Nintendo_GBA_SP/GBA_SP-[ADV]-[LCD-GRID]-[Night].slangp",
|
2023-02-17 09:38:00 +11:00
|
|
|
&base,
|
|
|
|
// "../test/slang-shaders/test/feedback.slancargogp",
|
|
|
|
// "../test/basic.slangp",
|
|
|
|
Some(&FilterChainOptionsVulkan {
|
|
|
|
frames_in_flight: 3,
|
|
|
|
force_no_mipmaps: false,
|
|
|
|
use_render_pass: true,
|
|
|
|
disable_cache: false,
|
|
|
|
}),
|
|
|
|
)
|
|
|
|
.unwrap();
|
|
|
|
|
|
|
|
hello_triangle::main(base, filter)
|
|
|
|
}
|
2023-02-16 16:39:36 +11:00
|
|
|
|
|
|
|
// 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
|
|
|
|
// // )
|
|
|
|
//
|
|
|
|
// 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,
|
|
|
|
// )
|
|
|
|
// // FilterChain::load_from_path("../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", None)
|
|
|
|
// .unwrap();
|
|
|
|
// hello_triangle_old::main(base, filter);
|
2023-02-17 09:33:47 +11:00
|
|
|
}
|