Add renderer trace scope contract
This commit is contained in:
@@ -27,6 +27,8 @@ enum class RecordedRenderCommandKind : std::uint8_t {
|
||||
blit_render_target,
|
||||
end_render_pass,
|
||||
trace_marker,
|
||||
trace_begin_scope,
|
||||
trace_end_scope,
|
||||
};
|
||||
|
||||
struct RecordedRenderCommand {
|
||||
@@ -176,10 +178,13 @@ private:
|
||||
class RecordingRenderTrace final : public IRenderTrace {
|
||||
public:
|
||||
explicit RecordingRenderTrace(std::vector<RecordedRenderCommand>& commands) noexcept;
|
||||
void marker(const char* component, const char* name) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status marker(const char* component, const char* name) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status begin_scope(const char* component, const char* name) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status end_scope() noexcept override;
|
||||
|
||||
private:
|
||||
std::vector<RecordedRenderCommand>* commands_ = nullptr;
|
||||
std::uint32_t scope_depth_ = 0;
|
||||
};
|
||||
|
||||
class RecordingRenderDevice final : public IRenderDevice {
|
||||
|
||||
Reference in New Issue
Block a user