Add renderer frame capture contract

This commit is contained in:
2026-06-02 15:18:04 +02:00
parent d37145660a
commit 818014127a
9 changed files with 138 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ enum class RecordedRenderCommandKind : std::uint8_t {
bind_mesh,
draw,
read_texture,
capture_frame,
end_render_pass,
trace_marker,
};
@@ -27,6 +28,7 @@ struct RecordedRenderCommand {
TextureDesc texture_desc {};
ReadbackRegion readback_region {};
std::uint64_t readback_bytes = 0;
std::uint64_t capture_bytes = 0;
const char* component = "";
const char* name = "";
};
@@ -91,6 +93,9 @@ public:
ITexture2D& texture,
ReadbackRegion region,
IReadbackBuffer& destination) noexcept override;
[[nodiscard]] pp::foundation::Status capture_frame(
IRenderTarget& target,
IReadbackBuffer& destination) noexcept override;
void end_render_pass() noexcept override;
[[nodiscard]] bool in_render_pass() const noexcept;