Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::GeodeGpuContext Struct Reference

Everything Geode's encoders need to record a frame through the donner::gpu runtime. More...

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

Public Member Functions

void countBuffer () const
 Forwards to GeodeDevice::countBuffer when wired.
void countTexture () const
 Forwards to GeodeDevice::countTexture when wired.
void countBindGroup () const
 Forwards to GeodeDevice::countBindGroup when wired.
void countPipelineSwitch () const
 Forwards to GeodeDevice::countPipelineSwitch when wired.
void countPathEncode () const
 Forwards to GeodeDevice::countPathEncode when wired.
void countBufferWrite (uint64_t bytes) const
 Forwards to GeodeDevice::countBufferWrite when wired.
void countTextureWrite (uint64_t bytes) const
 Forwards to GeodeDevice::countTextureWrite when wired.
void countSubmit () const
 Forwards to GeodeDevice::countSubmit when wired.
GeodeMaskPipelinemaskPipeline () const
 The Slug mask pipeline: maskPipelineOverride when set (tests), otherwise the shared lazily-built GeodeDevice::maskPipeline(). Requires one of the two to be available.

Public Attributes

gpu::DevicegpuDevice = nullptr
 The GPU runtime device recording is performed against. Required (never null when wired).
GeodeDevicegeodeDevice = nullptr
 Optional counter sink + lazy mask-pipeline owner. Null in GPU-less test harnesses.
const gpu::TextureViewdummyPatternTextureView = nullptr
 1x1 opaque-black RGBA8 dummy view bound into the pattern slot of solid / gradient draws.
const gpu::SamplerdummyPatternSampler = nullptr
 Linear-Repeat sampler paired with dummyPatternTextureView (and real pattern tiles).
const gpu::TextureViewdummyClipMaskTextureView = nullptr
 1x1 full-coverage dummy view bound into the clip-mask slot when no clip mask is active.
const gpu::SamplerdummyClipMaskSampler = nullptr
 Linear-ClampToEdge sampler paired with dummyClipMaskTextureView (and real masks).
const gpu::BufferidentityInstanceRecordBuffer = nullptr
 One full-size identity instance record, bound by every non-instanced Slug fill.
const gpu::BufferdummyPaintDataBuffer = nullptr
 One zero-filled gradient paint block, bound by draws that carry no gradient paint.
GeodeMaskPipelinemaskPipelineOverride = nullptr
 Test override for maskPipeline. Production leaves this null and resolves the shared lazily-built pipeline through geodeDevice.

Detailed Description

Everything Geode's encoders need to record a frame through the donner::gpu runtime.

Production wires one of these from GeodeDevice (see GeodeDevice::gpuContext()): the gpuDevice is the device's adapter, the dummy resources are the shared device-owned identity fills for inactive pattern / clip-mask / paint bind slots, and the counter helpers forward to the GeodeDevice perf counters. A test harness can instead construct one against a GPU-less donner::gpu::Device with geodeDevice == nullptr (counters become no-ops) and maskPipelineOverride set.

Non-owning: every pointer references state owned by the wiring scope, which must outlive any encoder recording against this context.

Member Function Documentation

◆ countBufferWrite()

void donner::geode::GeodeGpuContext::countBufferWrite ( uint64_t bytes) const

Forwards to GeodeDevice::countBufferWrite when wired.

Parameters
bytesPayload byte count.

◆ countTextureWrite()

void donner::geode::GeodeGpuContext::countTextureWrite ( uint64_t bytes) const

Forwards to GeodeDevice::countTextureWrite when wired.

Parameters
bytesPayload byte count.

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