Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
LinkedProjectionTesting.h File Reference

Registration of alternate projections, for tests whose device consumes a projection the build does not link. Declared in a test-only library, so no production target can register one. More...

Include dependency graph for LinkedProjectionTesting.h:

Namespaces

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

Functions

void donner::gpu::shader::RegisterAlternateProjection (const CompiledShaderView &linked, ShaderSourceKind kind, const CompiledShaderView &alternate)
 Registers alternate as the view of linked's family for devices that consume kind.

Detailed Description

Registration of alternate projections, for tests whose device consumes a projection the build does not link. Declared in a test-only library, so no production target can register one.

Function Documentation

◆ RegisterAlternateProjection()

void donner::gpu::shader::RegisterAlternateProjection ( const CompiledShaderView & linked,
ShaderSourceKind kind,
const CompiledShaderView & alternate )

Registers alternate as the view of linked's family for devices that consume kind.

Registration must happen before any device that consumes kind selects linked; the test-only alternates library does it from a static initializer. Registering the same alternate again is a no-op, and registering a different one for the same family and kind is a fatal error. Both views must outlive the process; artifact views do.

Parameters
linkedThe family's linked artifact, identified by address.
kindSource kind alternate carries.
alternateThe family's artifact for kind.