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 |
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.
|
explicit |
|
noexcept |
|
delete |
| pulp::render::GpuFrame::~GpuFrame | ( | ) |
| GpuComputePass pulp::render::GpuFrame::compute_pass | ( | std::string_view | label = {} | ) |
| GpuRenderPass pulp::render::GpuFrame::render_pass | ( | const GpuRenderPassDesc & | desc | ) |
| 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.
|
noexcept |