From 0c233670c651b1ffa9cab45be1d42ceb06db83a9 Mon Sep 17 00:00:00 2001 From: marc0246 <40955683+marc0246@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:50:58 +0100 Subject: [PATCH] Fix `shader!` using `bytes` not getting recompiled when the file changes (#2616) --- vulkano-shaders/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vulkano-shaders/src/lib.rs b/vulkano-shaders/src/lib.rs index bcb808a4f6..d9805692cb 100644 --- a/vulkano-shaders/src/lib.rs +++ b/vulkano-shaders/src/lib.rs @@ -348,7 +348,9 @@ fn shader_inner(mut input: MacroInput) -> Result { let words = vulkano::shader::spirv::bytes_to_words(&bytes) .or_else(|err| bail!(path, "failed to read source `{full_path:?}`: {err}"))?; - codegen::reflect(&input, path, name, &words, Vec::new(), &mut type_registry)? + let includes = vec![full_path.into_os_string().into_string().unwrap()]; + + codegen::reflect(&input, path, name, &words, includes, &mut type_registry)? } };