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 on device from the precompiled artifact. | |
| GeodeSnapshotReadbackPipeline (const GeodeSnapshotReadbackPipeline &)=delete | |
| GeodeSnapshotReadbackPipeline & | operator= (const GeodeSnapshotReadbackPipeline &)=delete |
| GeodeSnapshotReadbackPipeline (GeodeSnapshotReadbackPipeline &&other) noexcept=default | |
| Construct by moving another instance's state. | |
| GeodeSnapshotReadbackPipeline & | operator= (GeodeSnapshotReadbackPipeline &&other) noexcept=default |
| Replace this object's state by moving another instance. | |
| 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. | |
| uint32_t | inputBinding () const |
| Reflected binding of the premultiplied source texture. | |
| uint32_t | outputBinding () const |
| Reflected binding of the straight-alpha storage destination. | |
| gpu::WorkgroupSize | workgroupSize () const |
| Workgroup shape the entry point declares. | |
Compute pipeline for GPU-side snapshot unpremultiplication.
Reads a premultiplied-alpha render target (texture_2d<f32>) and writes straight-alpha RGBA8 into a write-only rgba8unorm storage texture; both binding slots and the workgroup shape come from the precompiled artifact's reflected interface. 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 on device from the precompiled artifact.
| device | Runtime device the pipeline and its layouts are created on. |
|
defaultnoexcept |
Construct by moving another instance's state.
| other | Source object. |
|
defaultnoexcept |
Replace this object's state by moving another instance.
| other | Source object. |