From d6f1af8691f40241637b793043a2bd13961ddf20 Mon Sep 17 00:00:00 2001 From: chyyran Date: Thu, 15 Feb 2024 01:04:49 -0500 Subject: [PATCH] rt: fix tests --- Cargo.lock | 63 ++++++------------- librashader-preprocess/Cargo.toml | 1 - .../tests/hello_triangle/mod.rs | 3 + librashader-runtime-vk/tests/triangle.rs | 2 +- .../tests/hello_triangle.rs | 6 +- 5 files changed, 28 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 672cc22..c4af4cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1527,9 +1527,9 @@ dependencies = [ "halfbrown", "icrate 0.1.0", "librashader-cache", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-reflect", "librashader-runtime", "librashader-runtime-d3d11", @@ -1584,15 +1584,6 @@ dependencies = [ "windows 0.48.0", ] -[[package]] -name = "librashader-common" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad5041e5e0a2a30e800f2337e987f4cd7faa2bf82cb29c8f974e926f48bf450a" -dependencies = [ - "num-traits", -] - [[package]] name = "librashader-common" version = "0.2.0-rc.2" @@ -1613,32 +1604,18 @@ version = "0.2.0-rc.2" dependencies = [ "encoding_rs", "glob", - "librashader-common 0.2.0-rc.2", - "librashader-presets 0.1.4", + "librashader-common", "nom", "rayon", "thiserror", ] -[[package]] -name = "librashader-presets" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dff9682cba59d2e09c3920edddd97c3f103b67904cfa8b18a6cae93cf7761c4" -dependencies = [ - "librashader-common 0.1.4", - "nom", - "nom_locate", - "num-traits", - "thiserror", -] - [[package]] name = "librashader-presets" version = "0.2.0-rc.2" dependencies = [ "glob", - "librashader-common 0.2.0-rc.2", + "librashader-common", "nom", "nom_locate", "num-traits", @@ -1657,9 +1634,9 @@ dependencies = [ "bytemuck", "glslang", "indexmap 2.2.3", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-spirv-cross", "matches", "naga", @@ -1677,9 +1654,9 @@ version = "0.2.0-rc.2" dependencies = [ "bytemuck", "image", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-reflect", "num-traits", "tinymap", @@ -1693,9 +1670,9 @@ dependencies = [ "bytemuck", "gfx-maths", "librashader-cache", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-reflect", "librashader-runtime", "rayon", @@ -1713,9 +1690,9 @@ dependencies = [ "bytemuck", "gfx-maths", "librashader-cache", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-reflect", "librashader-runtime", "parking_lot", @@ -1734,9 +1711,9 @@ dependencies = [ "gl", "glfw 0.47.0", "librashader-cache", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-reflect", "librashader-runtime", "librashader-spirv-cross", @@ -1752,9 +1729,9 @@ dependencies = [ "array-concat", "bytemuck", "icrate 0.1.0", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-reflect", "librashader-runtime", "objc2 0.5.0", @@ -1773,9 +1750,9 @@ dependencies = [ "glfw 0.49.1", "gpu-allocator 0.22.0", "librashader-cache", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-reflect", "librashader-runtime", "num", @@ -1795,9 +1772,9 @@ dependencies = [ "config", "env_logger", "image", - "librashader-common 0.2.0-rc.2", + "librashader-common", "librashader-preprocess", - "librashader-presets 0.2.0-rc.2", + "librashader-presets", "librashader-reflect", "librashader-runtime", "log", diff --git a/librashader-preprocess/Cargo.toml b/librashader-preprocess/Cargo.toml index 4bb2e99..965135c 100644 --- a/librashader-preprocess/Cargo.toml +++ b/librashader-preprocess/Cargo.toml @@ -22,6 +22,5 @@ default = [ "line_directives" ] line_directives = [] [dev-dependencies] -librashader-presets = "0.1.0-rc.3" glob = "0.3.1" rayon = "1.6.1" diff --git a/librashader-runtime-vk/tests/hello_triangle/mod.rs b/librashader-runtime-vk/tests/hello_triangle/mod.rs index 38ac25f..2a98114 100644 --- a/librashader-runtime-vk/tests/hello_triangle/mod.rs +++ b/librashader-runtime-vk/tests/hello_triangle/mod.rs @@ -259,6 +259,9 @@ impl VulkanWindow { Some(&FrameOptionsVulkan { clear_history: frame == 0, frame_direction: 0, + current_subframe: 1, + rotation: 0, + total_subframes: 1, }), ) .unwrap(); diff --git a/librashader-runtime-vk/tests/triangle.rs b/librashader-runtime-vk/tests/triangle.rs index 4fe5cac..0952d86 100644 --- a/librashader-runtime-vk/tests/triangle.rs +++ b/librashader-runtime-vk/tests/triangle.rs @@ -11,7 +11,7 @@ fn triangle_vk() { unsafe { let filter = FilterChainVulkan::load_from_path( - "../test/shaders_slang/crt/crt-royale.slangp", + "../test/shaders_slang/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", // "../test/Mega_Bezel_Packs/Duimon-Mega-Bezel/Presets/Advanced/Nintendo_GBA_SP/GBA_SP-[ADV]-[LCD-GRID]-[Night].slangp", &base, // "../test/slang-shaders/test/feedback.slancargogp", diff --git a/librashader-runtime-wgpu/tests/hello_triangle.rs b/librashader-runtime-wgpu/tests/hello_triangle.rs index 8d77007..ed90661 100644 --- a/librashader-runtime-wgpu/tests/hello_triangle.rs +++ b/librashader-runtime-wgpu/tests/hello_triangle.rs @@ -118,8 +118,10 @@ impl<'a> State<'a> { let device = Arc::new(device); let queue = Arc::new(queue); - let preset = - ShaderPreset::try_parse("../test/shaders_slang/crt/crt-royale.slangp").unwrap(); + let preset = ShaderPreset::try_parse( + "../test/shaders_slang/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp", + ) + .unwrap(); let chain = FilterChainWgpu::load_from_preset( preset,