mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 03:18:06 +08:00
Shaders: runtime and shader node codegen (#2985)
* shader-rt: initial * shader-rt: fix recursion when generating shader node * shader-rt: replace gpu node's args and ret types with `Raster<GPU>` * shader-rt: properly cfg out the gpu node * shader-rt: fix `impl Context` in the wrong places * shader-rt: disable gpu blend node, needs two images * shader-rt: connect shader runtime * shader-rt: pass WgpuExecutor by reference * shader-rt: correct bindings with derpy arg buffer * shader-rt: manual pipeline layout, fixing errors when bindings got DCE'd * shader-rt: correct RT format, working invert gpu node * shader-rt: cleanup codegen with common sym struct * shader-rt: correct arg buffer handling * shader-nodes feature: put shader nodes behind feature gate * shader-nodes feature: rename any `gpu_node` to `shader-node` * shaders-rt: fix wgpu label name * shaders-rt: explain fullscreen_vertex coordinates with a drawing
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
mod context;
|
||||
pub mod shader_runtime;
|
||||
pub mod texture_upload;
|
||||
|
||||
use crate::shader_runtime::ShaderRuntime;
|
||||
use anyhow::Result;
|
||||
pub use context::Context;
|
||||
use dyn_any::StaticType;
|
||||
@@ -18,6 +20,7 @@ use wgpu::{Origin3d, SurfaceConfiguration, TextureAspect};
|
||||
pub struct WgpuExecutor {
|
||||
pub context: Context,
|
||||
vello_renderer: Mutex<Renderer>,
|
||||
pub shader_runtime: ShaderRuntime,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for WgpuExecutor {
|
||||
@@ -195,6 +198,7 @@ impl WgpuExecutor {
|
||||
.ok()?;
|
||||
|
||||
Some(Self {
|
||||
shader_runtime: ShaderRuntime::new(&context),
|
||||
context,
|
||||
vello_renderer: vello_renderer.into(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user