Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::render::GpuFrame Class Reference

One command encoder's worth of passes, submitted once. More...

#include <gpu_pass.hpp>

Public Member Functions

 GpuFrame (const GpuDevice &device, std::string_view label={})
 GpuFrame (GpuFrame &&) noexcept
GpuFrame & operator= (GpuFrame &&)=delete
 GpuFrame (const GpuFrame &)=delete
GpuFrame & operator= (const GpuFrame &)=delete
 ~GpuFrame ()
GpuRenderPass render_pass (const GpuRenderPassDesc &desc)
GpuComputePass compute_pass (std::string_view label={})
GpuResult< GpuSubmission > submit ()
 Finish the encoder and submit it.
bool submitted () const noexcept

Detailed Description

One command encoder's worth of passes, submitted once.

The frame opens WebGPU error scopes when it begins and closes them at submit, so every Dawn error raised while recording is attributed to this frame. Keep a frame's lifetime to its own recording: do not draw on the Skia canvas while a frame is open. One pass may be open at a time.

Destroying an unsubmitted frame submits it. A failure there is logged, since a destructor cannot return it; call submit() to see it.

Constructor & Destructor Documentation

◆ GpuFrame() [1/3]

pulp::render::GpuFrame::GpuFrame ( const GpuDevice & device,
std::string_view label = {} )
explicit

◆ GpuFrame() [2/3]

pulp::render::GpuFrame::GpuFrame ( GpuFrame && )
noexcept

◆ GpuFrame() [3/3]

pulp::render::GpuFrame::GpuFrame ( const GpuFrame & )
delete

◆ ~GpuFrame()

pulp::render::GpuFrame::~GpuFrame ( )

Member Function Documentation

◆ compute_pass()

GpuComputePass pulp::render::GpuFrame::compute_pass ( std::string_view label = {})

◆ operator=() [1/2]

GpuFrame & pulp::render::GpuFrame::operator= ( const GpuFrame & )
delete

◆ operator=() [2/2]

GpuFrame & pulp::render::GpuFrame::operator= ( GpuFrame && )
delete

◆ render_pass()

GpuRenderPass pulp::render::GpuFrame::render_pass ( const GpuRenderPassDesc & desc)

◆ submit()

GpuResult< GpuSubmission > pulp::render::GpuFrame::submit ( )

Finish the encoder and submit it.

Returns the recording, validation and device errors of this frame, or a handle that reports GPU-side completion. A second call fails with invalid_argument.

◆ submitted()

bool pulp::render::GpuFrame::submitted ( ) const
noexcept

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/render/include/pulp/render/gpu_pass.hpp