From 95ac8adc20bda86b572b39fff0a473f29946f4ad Mon Sep 17 00:00:00 2001 From: chyyran Date: Thu, 22 Feb 2024 00:14:17 -0500 Subject: [PATCH] rt(d3d12,d3d11): remove unused COLOR attribute in quad --- Cargo.lock | 18 ++++-------------- librashader-runtime-d3d11/src/draw_quad.rs | 11 ----------- librashader-runtime-d3d11/tests/triangle.rs | 6 +++--- librashader-runtime-d3d12/src/draw_quad.rs | 11 ----------- 4 files changed, 7 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 061121f..f849c9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -324,9 +324,9 @@ checksum = "832133bbabbbaa9fbdba793456a2827627a7d2b8fb96032fa1e7666d7895832b" [[package]] name = "bumpalo" -version = "3.15.1" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c764d619ca78fccbf3069b37bd7af92577f044bb15236036662d79b6559f25b7" +checksum = "a3b1be7772ee4501dba05acbe66bb1e8760f6a6c474a36035631638e4415f130" [[package]] name = "bytecount" @@ -413,11 +413,10 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730" dependencies = [ - "jobserver", "libc", ] @@ -1374,15 +1373,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - [[package]] name = "jpeg-decoder" version = "0.3.1" diff --git a/librashader-runtime-d3d11/src/draw_quad.rs b/librashader-runtime-d3d11/src/draw_quad.rs index 71adac2..8cfce19 100644 --- a/librashader-runtime-d3d11/src/draw_quad.rs +++ b/librashader-runtime-d3d11/src/draw_quad.rs @@ -17,31 +17,24 @@ use windows::Win32::Graphics::Dxgi::Common::DXGI_FORMAT_R32G32_FLOAT; struct D3D11Vertex { position: [f32; 2], texcoord: [f32; 2], - color: [f32; 4], } -const CLEAR: [f32; 4] = [1.0, 1.0, 1.0, 1.0]; - const OFFSCREEN_VBO_DATA: [D3D11Vertex; 4] = [ D3D11Vertex { position: [-1.0, -1.0], texcoord: [0.0, 1.0], - color: CLEAR, }, D3D11Vertex { position: [-1.0, 1.0], texcoord: [0.0, 0.0], - color: CLEAR, }, D3D11Vertex { position: [1.0, -1.0], texcoord: [1.0, 1.0], - color: CLEAR, }, D3D11Vertex { position: [1.0, 1.0], texcoord: [1.0, 0.0], - color: CLEAR, }, ]; @@ -49,22 +42,18 @@ const FINAL_VBO_DATA: [D3D11Vertex; 4] = [ D3D11Vertex { position: [0.0, 0.0], texcoord: [0.0, 1.0], - color: CLEAR, }, D3D11Vertex { position: [0.0, 1.0], texcoord: [0.0, 0.0], - color: CLEAR, }, D3D11Vertex { position: [1.0, 0.0], texcoord: [1.0, 1.0], - color: CLEAR, }, D3D11Vertex { position: [1.0, 1.0], texcoord: [1.0, 0.0], - color: CLEAR, }, ]; diff --git a/librashader-runtime-d3d11/tests/triangle.rs b/librashader-runtime-d3d11/tests/triangle.rs index ba4a4dc..5e2a9a3 100644 --- a/librashader-runtime-d3d11/tests/triangle.rs +++ b/librashader-runtime-d3d11/tests/triangle.rs @@ -12,13 +12,13 @@ use librashader_runtime_d3d11::options::FilterChainOptionsD3D11; // const FILTER_PATH: &str = // "../test/Mega_Bezel_Packs/Duimon-Mega-Bezel/Presets/Advanced/Nintendo_GBA_SP/GBA_SP-[ADV]-[LCD-GRID].slangp"; -const FILTER_PATH: &str = - "../test/shaders_slang/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp"; +// const FILTER_PATH: &str = +// "../test/shaders_slang/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp"; // const FILTER_PATH: &str = "../test/slang-shaders/test/history.slangp"; // const FILTER_PATH: &str = "../test/slang-shaders/test/feedback.slangp"; -// const FILTER_PATH: &str = "../test/slang-shaders/crt/crt-royale.slangp"; +const FILTER_PATH: &str = "../test/shaders_slang/crt/crt-royale.slangp"; const IMAGE_PATH: &str = "../triangle.png"; #[test] fn triangle_d3d11_args() { diff --git a/librashader-runtime-d3d12/src/draw_quad.rs b/librashader-runtime-d3d12/src/draw_quad.rs index bfc4757..ecc30c7 100644 --- a/librashader-runtime-d3d12/src/draw_quad.rs +++ b/librashader-runtime-d3d12/src/draw_quad.rs @@ -16,31 +16,24 @@ use windows::Win32::Graphics::Dxgi::Common::DXGI_FORMAT_R32G32_FLOAT; struct D3D12Vertex { position: [f32; 2], texcoord: [f32; 2], - color: [f32; 4], } -const CLEAR: [f32; 4] = [1.0, 1.0, 1.0, 1.0]; - const OFFSCREEN_VBO_DATA: [D3D12Vertex; 4] = [ D3D12Vertex { position: [-1.0, -1.0], texcoord: [0.0, 1.0], - color: CLEAR, }, D3D12Vertex { position: [-1.0, 1.0], texcoord: [0.0, 0.0], - color: CLEAR, }, D3D12Vertex { position: [1.0, -1.0], texcoord: [1.0, 1.0], - color: CLEAR, }, D3D12Vertex { position: [1.0, 1.0], texcoord: [1.0, 0.0], - color: CLEAR, }, ]; @@ -48,22 +41,18 @@ const FINAL_VBO_DATA: [D3D12Vertex; 4] = [ D3D12Vertex { position: [0.0, 0.0], texcoord: [0.0, 1.0], - color: CLEAR, }, D3D12Vertex { position: [0.0, 1.0], texcoord: [0.0, 0.0], - color: CLEAR, }, D3D12Vertex { position: [1.0, 0.0], texcoord: [1.0, 1.0], - color: CLEAR, }, D3D12Vertex { position: [1.0, 1.0], texcoord: [1.0, 0.0], - color: CLEAR, }, ];