From fa5ca2275758dc293796c509889b3ff791fee0bc Mon Sep 17 00:00:00 2001 From: fjamesprice Date: Sun, 1 Nov 2026 03:40:18 -0500 Subject: [PATCH] test(camera-raw): validate the Dehaze, Clarity and Texture shader without a GPU The adapter-free shader test now validates camera_raw_filters.wgsl as the pass compiles it, appended to camera_raw_tone.wgsl, so a runner without a GPU still catches a filters shader that wouldn't compile. Appending an undefined identifier to camera_raw_filters.wgsl fails it. Part of #6916. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014nuVUg57HqXLARdhymFiTc --- crates/gpu/tests/it/camera_raw.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/gpu/tests/it/camera_raw.rs b/crates/gpu/tests/it/camera_raw.rs index 9d11c9c22e..754b3e82be 100644 --- a/crates/gpu/tests/it/camera_raw.rs +++ b/crates/gpu/tests/it/camera_raw.rs @@ -57,10 +57,12 @@ fn gpu() -> Option { } /// The Camera Raw shaders parse and validate (naga, as wgpu does before any driver sees them), -/// with no adapter: the GPU tests below skip on runners without one. +/// with no adapter: the GPU tests below skip on runners without one. The filters are compiled +/// appended to the tone shader, as the pass builds them. #[test] fn the_shaders_validate_without_a_gpu() { - for src in [photocraft_gpu::CAMERA_RAW_SHADER, photocraft_gpu::CAMERA_RAW_TONE_SHADER] { + let tone = format!("{}\n{}", photocraft_gpu::CAMERA_RAW_TONE_SHADER, photocraft_gpu::CAMERA_RAW_FILTERS_SHADER); + for src in [photocraft_gpu::CAMERA_RAW_SHADER, tone.as_str()] { let module = wgpu::naga::front::wgsl::parse_str(src).unwrap_or_else(|e| panic!("{}", e.emit_to_string(src))); wgpu::naga::valid::Validator::new(wgpu::naga::valid::ValidationFlags::all(), wgpu::naga::valid::Capabilities::empty()) .validate(&module)