|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Compute pipeline for GPU-side snapshot unpremultiplication. More...
#include "donner/svg/renderer/geode/GeodePipeline.h"
Public Member Functions | |
| GeodeSnapshotReadbackPipeline (gpu::Device &device) | |
| Create the snapshot-unpremultiply compute pipeline for the given device. | |
| GeodeSnapshotReadbackPipeline (const GeodeSnapshotReadbackPipeline &)=delete | |
| GeodeSnapshotReadbackPipeline & | operator= (const GeodeSnapshotReadbackPipeline &)=delete |
| GeodeSnapshotReadbackPipeline (GeodeSnapshotReadbackPipeline &&) noexcept=default | |
| GeodeSnapshotReadbackPipeline & | operator= (GeodeSnapshotReadbackPipeline &&) noexcept=default |
| bool | valid () const |
| True when the bind group layout and compute pipeline were created. | |
| const gpu::ComputePipeline & | pipeline () const |
| The compute pipeline. | |
| const gpu::BindGroupLayout & | bindGroupLayout () const |
| The bind group layout used by the pipeline. | |
Compute pipeline for GPU-side snapshot unpremultiplication.
Reads a premultiplied-alpha render target (binding 0, texture_2d<f32>) and writes straight-alpha RGBA8 into the storage texture at binding 1 (rgba8unorm, write-only). Owned lazily by GeodeDevice so every snapshot sharing the device reuses one compiled pipeline (issue #575: wgpu-native retains compiled pipelines).
The stored bytes replicate the CPU round-half-up reference formula in RendererGeode::ReadGeodeTextureSnapshot exactly, so snapshots produced through this pipeline are byte-identical to the CPU readback path.
|
explicit |
Create the snapshot-unpremultiply compute pipeline for the given device.
Create the snapshot-unpremultiply compute pipeline on device from the shader IR program.
| device | Runtime device the pipeline and its layouts are created on. |