|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
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. | |
| GeodeMaskPipeline & | maskPipeline () 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::Device * | gpuDevice = nullptr |
| The GPU runtime device recording is performed against. Required (never null when wired). | |
| GeodeDevice * | geodeDevice = nullptr |
| Optional counter sink + lazy mask-pipeline owner. Null in GPU-less test harnesses. | |
| const gpu::TextureView * | dummyPatternTextureView = nullptr |
| 1x1 opaque-black RGBA8 dummy view bound into the pattern slot of solid / gradient draws. | |
| const gpu::Sampler * | dummyPatternSampler = nullptr |
| Linear-Repeat sampler paired with dummyPatternTextureView (and real pattern tiles). | |
| const gpu::TextureView * | dummyClipMaskTextureView = nullptr |
| 1x1 full-coverage dummy view bound into the clip-mask slot when no clip mask is active. | |
| const gpu::Sampler * | dummyClipMaskSampler = nullptr |
| Linear-ClampToEdge sampler paired with dummyClipMaskTextureView (and real masks). | |
| const gpu::Buffer * | identityInstanceRecordBuffer = nullptr |
| One full-size identity instance record, bound by every non-instanced Slug fill. | |
| const gpu::Buffer * | dummyPaintDataBuffer = nullptr |
| One zero-filled gradient paint block, bound by draws that carry no gradient paint. | |
| GeodeMaskPipeline * | maskPipelineOverride = nullptr |
| Test override for maskPipeline. Production leaves this null and resolves the shared lazily-built pipeline through geodeDevice. | |
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.
| void donner::geode::GeodeGpuContext::countBufferWrite | ( | uint64_t | bytes | ) | const |
Forwards to GeodeDevice::countBufferWrite when wired.
| bytes | Payload byte count. |
| void donner::geode::GeodeGpuContext::countTextureWrite | ( | uint64_t | bytes | ) | const |
Forwards to GeodeDevice::countTextureWrite when wired.
| bytes | Payload byte count. |