Gate a flipped shader node's layout metadata out of the GPU build

This commit is contained in:
Dennis Kobert
2026-08-15 14:49:19 +00:00
parent 214632c5ec
commit 87200f3c2a

View File

@@ -1739,7 +1739,10 @@ pub(crate) fn generate_node_impl(crate_ident: &CrateIdent, parsed: &ParsedNodeFn
None => quote!(#core_types::record::ElementSpec::Carried),
};
let layout_meta = crate::codegen::ir::layout_meta_tokens(&node, element_spec, core_types);
// A flipped shader node's struct and impl are std-gated; its layout meta must be too.
let cfg = crate::shader_nodes::modify_cfg(&parsed.attributes);
quote! {
#cfg
#vis fn #layout_meta_fn() -> #core_types::record::LayoutMeta {
#layout_meta
}