Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::GeodeDevice::SceneBatchBindGroupKey Struct Reference

Key identifying a scene-batch bind group by its exact buffer bindings: the shared batch uniform allocation, the geometry slab chunk, and the record span. More...

#include "donner/svg/renderer/geode/GeodeDevice.h"

Public Attributes

uint64_t uniformBufferId = 0
 Identity of the batch uniform buffer.
uint64_t uniformOffset = 0
 Byte offset of the uniform binding.
uint64_t uniformSize = 0
 Byte length of the uniform binding.
uint64_t chunkBufferId = 0
 Identity of the encoded geometry chunk buffer.
uint64_t chunkBytes = 0
 Byte length of the bound geometry chunks.
uint64_t recordBufferId = 0
 Identity of the scene-record buffer.
uint64_t recordOffset = 0
 Byte offset of the scene-record binding.
uint64_t recordBytes = 0
 Byte length of the scene-record binding.

Friends

bool operator== (const SceneBatchBindGroupKey &a, const SceneBatchBindGroupKey &b)=default
 Compare all members for value equality.
bool operator< (const SceneBatchBindGroupKey &a, const SceneBatchBindGroupKey &b)
 Order binding keys lexicographically for cache lookup.

Detailed Description

Key identifying a scene-batch bind group by its exact buffer bindings: the shared batch uniform allocation, the geometry slab chunk, and the record span.

The dummy texture/sampler bindings are device-owned singletons, so they never contribute to the key.

Scene batches bind pooled arena and slab buffers whose identities and offsets are stable across steady-state frames, so a cached bind group keyed this way is reusable frame over frame (keeping the per-frame bind-group create count flat; the GeodePerf ceilings pin this).

Buffers are identified by the process-unique ids handed out by AllocateBufferId(), rather than a backend handle address that may be recycled when a document releases its slab. A device outlives the documents drawn on it, so an address reused by another document must never retrieve the previous document's cached bind group.

◆ operator<

bool operator< ( const SceneBatchBindGroupKey & a,
const SceneBatchBindGroupKey & b )
friend

Order binding keys lexicographically for cache lookup.

Parameters
aValue to compare.
bValue to compare.

◆ operator==

bool operator== ( const SceneBatchBindGroupKey & a,
const SceneBatchBindGroupKey & b )
friend

Compare all members for value equality.

Parameters
aValue to compare.
bValue to compare.

The documentation for this struct was generated from the following file: