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

Bind group indices of the flood compute program. More...

#include <cstdint>
#include <string_view>
Include dependency graph for FloodBindings.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::FloodBinding : uint32_t {
  OutputTexture = 0 ,
  Params = 1
}
 Bind group indices of the flood compute 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::kFloodEntryPoint = "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::kFloodWorkgroupSize = 8
 Workgroup size the entry point declares.

Detailed Description

Bind group indices of the flood compute 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

◆ FloodBinding

enum class donner::gpu::shader::programs::FloodBinding : uint32_t
strong

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

Enumerator
OutputTexture 

texture_storage_2d<rgba32float, write> destination.

Params 

Uniform buffer holding the single color the destination is filled with.

Variable Documentation

◆ kFloodWorkgroupSize

uint32_t donner::gpu::shader::programs::kFloodWorkgroupSize = 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.