GSoC 2025: GPU-accelerated raster ops #2658
Replies: 8 comments
-
PreparationAnything before week 1
|
Beta Was this translation helpful? Give feedback.
-
Week 1: being sickAm sick this week, likely caught something last week in the (amazing) rustweek conference. Still made some progress:
|
Beta Was this translation helpful? Give feedback.
-
Week 2: cargo-gpu naga transpile vertical sliceDemoA vertical slice of using cargo gpu to compile rust-gpu shaders and transpile them to wgsl with naga, so they can be passed to wgpu. Based on a GameJam game of mine with just 4 shaders, small enough to allow quick iteration and API exploration. Progress
|
Beta Was this translation helpful? Give feedback.
-
Week 3: invert_gpuDemo
Progress
|
Beta Was this translation helpful? Give feedback.
-
Week 4:
|
Beta Was this translation helpful? Give feedback.
-
Week 5: refactoring
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Week 7Progress
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Graphite used not have any hardware acceleration and compose the final image entirely on the CPU,
but in the past year, the vello renderer was implemented to accelerate the image composition on the
GPU. However, vello is only well suited for composing vector elements and plain raster images. It
does not implement any operations for (post-)processing raster images, like adjusting hue,
saturation, blending images, a posterization effect, etc. Currently, these “raster ops” are still
evaluated on the CPU, given that Graphite runs within the Web Assembly (wasm) environment of
the browser, limited to a single thread processing one pixel at a time. This significantly slows editing
with any raster-based content being present, in practice 2-3 fps on a typical desktop system.
Benefit
I want to accelerate the processing of rasterization ops using the GPU to achieve acceptable levels of
performance.
Instead of porting the existing raster ops written in Rust to a shader language, I want to use the
rust-gpu shader compiler to compile the existing Rust-based raster ops into shaders. It allows
Graphite to continue using the existing CPU path if
the new WebGPU APIWebGL is not available, withoutduplicating the code across several languages.
Constraints
Deliverables
nightly-2025-05-09
(~1.88) and Rust 2024 edition. Rust-GPU/rust-gpu#249rustc_backend_spirv
dylibs Rust-GPU/cargo-gpu#69Beta Was this translation helpful? Give feedback.
All reactions