Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
SnapshotUnpremultiplyBindings.h File Reference

Bind group indices of the snapshot-unpremultiply program. More...

#include <cstdint>
#include <string_view>
Include dependency graph for SnapshotUnpremultiplyBindings.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Enumerations

enum class  donner::gpu::shader::programs::SnapshotUnpremultiplyBinding : uint32_t {
  InputTexture = 0 ,
  OutputTexture = 1
}
 Bind group indices of the snapshot-unpremultiply program, shared by the IR builder and every host that creates its bind group layout. More...

Variables

constexpr std::string_view donner::gpu::shader::programs::kSnapshotUnpremultiplyEntryPoint = "cs_main"
 Name of the compute entry point, as the IR declares it and the emitted source spells it.
constexpr uint32_t donner::gpu::shader::programs::kSnapshotUnpremultiplyWorkgroupSize = 8
 Workgroup size the entry point declares.

Detailed Description

Bind group indices of the snapshot-unpremultiply program.

Split out from the program header so a host can build the program's bind group layout without linking the shader IR. The pipeline that does so consumes build-time emitted WGSL, and pulling in the IR for an enum would put the emitters back in binaries that exist to avoid them.

Enumeration Type Documentation

◆ SnapshotUnpremultiplyBinding

Bind group indices of the snapshot-unpremultiply program, shared by the IR builder and every host that creates its bind group layout.

Enumerator
InputTexture 

Sampled texture_2d<f32> premultiplied render target.

OutputTexture 

texture_storage_2d<rgba8unorm, write> straight-alpha destination.

Variable Documentation

◆ kSnapshotUnpremultiplyWorkgroupSize

uint32_t donner::gpu::shader::programs::kSnapshotUnpremultiplyWorkgroupSize = 8
inlineconstexpr

Workgroup size the entry point declares.

One definition, read by the IR builder that writes the shader and by every host that creates the pipeline or sizes a dispatch from it. A host restating it could drift, and a larger stale copy would silently under-dispatch, leaving the tail of the destination unwritten.