diff --git a/node-graph/graphene-cli/src/export.rs b/node-graph/graphene-cli/src/export.rs index 530c4138e4..ba414fa54c 100644 --- a/node-graph/graphene-cli/src/export.rs +++ b/node-graph/graphene-cli/src/export.rs @@ -17,7 +17,7 @@ fn execute_to_final(executor: &DynamicExecutor, render_config: RenderConfig) -> GPoll::Final(value) => Ok(value), GPoll::Fallback(boxed) => { let (value, error) = *boxed; - log::error!("Node graph evaluation reported an error alongside its fallback output: {error:?}"); + log::warn!("Node graph evaluation reported an error alongside its fallback output: {error:?}"); Ok(value) } GPoll::Partial(_) | GPoll::Pending => Err("Node graph evaluation did not complete".into()), diff --git a/node-graph/libraries/core-types/src/types.rs b/node-graph/libraries/core-types/src/types.rs index 646d5be1af..97644818aa 100644 --- a/node-graph/libraries/core-types/src/types.rs +++ b/node-graph/libraries/core-types/src/types.rs @@ -367,7 +367,7 @@ pub fn simplify_identifier_name(ty: &str) -> String { /// Converts a Rust-internal type name to its user-facing form. pub fn make_type_user_readable(ty: &str) -> String { let ty = ty - .replace("Option>", "Context") + .replace("ContextImpl", "Context") .replace("Raster", "Raster") .replace("Raster", "Raster") .replace("DAffine2", "Transform") diff --git a/node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs b/node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs index 325b5c0d69..ef62a9de46 100644 --- a/node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs +++ b/node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs @@ -5,7 +5,7 @@ use core_types::shaders::buffer_struct::BufferStruct; use raster_types::{GPU, Raster}; use std::borrow::Cow; use std::collections::HashMap; -use std::sync::Mutex; +use std::sync::{Mutex, PoisonError}; use wgpu::util::{BufferInitDescriptor, DeviceExt}; use wgpu::{ BindGroupDescriptor, BindGroupEntry, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingResource, BindingType, Buffer, BufferBinding, BufferBindingType, BufferUsages, ColorTargetState, Face, @@ -34,7 +34,7 @@ impl PerPixelAdjustShaderRuntime { impl ShaderRuntime { pub fn run_per_pixel_adjust(&self, shaders: &Shaders<'_>, textures: List>, args: Option<&T>) -> List> { - let mut cache = self.per_pixel_adjust.pipeline_cache.lock().unwrap(); + let mut cache = self.per_pixel_adjust.pipeline_cache.lock().unwrap_or_else(PoisonError::into_inner); let pipeline = cache .entry(shaders.fragment_shader_name.to_owned()) .or_insert_with(|| PerPixelAdjustGraphicsPipeline::new(&self.context, shaders)); diff --git a/node-graph/node-macro/src/shader_nodes/per_pixel_adjust.rs b/node-graph/node-macro/src/shader_nodes/per_pixel_adjust.rs index 30b3a7817a..1ec06a28e8 100644 --- a/node-graph/node-macro/src/shader_nodes/per_pixel_adjust.rs +++ b/node-graph/node-macro/src/shader_nodes/per_pixel_adjust.rs @@ -231,9 +231,9 @@ impl PerPixelAdjustCodegen<'_> { description: "".to_string(), widget_override: Default::default(), ty: ParsedFieldType::Regular(RegularParsedField { - ty: parse_quote!(std::sync::Arc), + ty: parse_quote!(#wgpu_executor::WgpuExecutorHandle), exposed: true, - value_source: ParsedValueSource::Scope(Box::new(parse_quote!("graphene_std::platform_application_io::WgpuExecutorArcNode"))), + value_source: ParsedValueSource::Scope(Box::new(parse_quote!("graphene_std::platform_application_io::WgpuExecutorNode"))), number_soft_min: None, number_soft_max: None, number_hard_min: None, diff --git a/node-graph/node-macro/src/validation.rs b/node-graph/node-macro/src/validation.rs index a45a7461f2..bc393560f9 100644 --- a/node-graph/node-macro/src/validation.rs +++ b/node-graph/node-macro/src/validation.rs @@ -24,6 +24,15 @@ pub fn validate_node_fn(parsed: &ParsedNodeFn) -> syn::Result<()> { fn validate_async_source(parsed: &ParsedNodeFn) { let snapshot_ctx = matches!(&parsed.input.ty, Type::Path(path) if path.path.segments.last().is_some_and(|segment| segment.ident == "CtxSnapshot")); let future_kernel = crate::codegen::is_source_kernel(&parsed.output_type); + if let Some(placeholder) = &parsed.attributes.placeholder + && !parsed.is_async + && !future_kernel + { + emit_error!( + placeholder.span(), + "`placeholder` applies only to async and source kernels; a synchronous node never reports `Partial`, so the stand-in is unused" + ); + } if parsed.is_async && future_kernel { emit_error!( parsed.output_type.span(),