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

The wgpu objects every reference runtime device records against, and the sticky loss condition they share. More...

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

Public Member Functions

 WgpuReferenceRoot (GeodeWgpuRoots handles, std::shared_ptr< gpu::DeviceLostState > lostState)
 Retains one complete set of wgpu objects.
 ~WgpuReferenceRoot ()
 Releases the wgpu handles. A lost root retains its driver handles rather than risking a call into a driver that stopped answering.
 WgpuReferenceRoot (const WgpuReferenceRoot &)=delete
WgpuReferenceRoot & operator= (const WgpuReferenceRoot &)=delete
const wgpu::Instance & instance () const
 Instance the adapter came from. Borrowed; the root retains it.
const wgpu::Adapter & adapter () const
 Adapter the device came from. Borrowed; the root retains it.
const wgpu::Device & device () const
 Device every runtime device over this root records against. Borrowed.
const wgpu::Queue & queue () const
 Default queue of device. Borrowed.
const std::shared_ptr< gpu::DeviceLostState > & lostState () const
 Sticky loss condition shared by every runtime device over this root.

Detailed Description

The wgpu objects every reference runtime device records against, and the sticky loss condition they share.

Retained through shared_ptr by each runtime device over it, so the handles outlive the last of them.

Produced only by SelectWgpuReference, so a root that exists is one whose device and queue are complete.

Constructor & Destructor Documentation

◆ WgpuReferenceRoot()

donner::geode::WgpuReferenceRoot::WgpuReferenceRoot ( GeodeWgpuRoots handles,
std::shared_ptr< gpu::DeviceLostState > lostState )

Retains one complete set of wgpu objects.

Parameters
handlesObjects the selection produced; released with this root.
lostStateSticky loss condition shared by every runtime device over these objects.

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