Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::frame::TraceCapture Class Reference

#include <trace_capture.h>

Collaboration diagram for bicameral::frame::TraceCapture:
[legend]

Public Member Functions

 TraceCapture (fs::path path, const gpu::GraphTraceFilter &filter)
void Add (std::span< const gpu::GraphTraceRecord > records, uint32_t droppedCount)
bool IsComplete (uint64_t latestStateTick) const
std::expected< void, std::string > Write ()
const fs::path & Path () const
const gpu::GraphTraceFilter & Filter () const

Static Public Attributes

static constexpr size_t MAX_RECORDS = size_t{1} << 22

Private Attributes

fs::path m_path
gpu::GraphTraceFilter m_filter
std::vector< gpu::GraphTraceRecord > m_records
uint64_t m_droppedCount = 0

Detailed Description

Definition at line 20 of file trace_capture.h.

Constructor & Destructor Documentation

◆ TraceCapture()

bicameral::frame::TraceCapture::TraceCapture ( fs::path path,
const gpu::GraphTraceFilter & filter )
inline

Definition at line 25 of file trace_capture.h.

References m_filter, and m_path.

Member Function Documentation

◆ Add()

void bicameral::frame::TraceCapture::Add ( std::span< const gpu::GraphTraceRecord > records,
uint32_t droppedCount )

Definition at line 15 of file trace_capture.cpp.

References m_droppedCount, m_records, and MAX_RECORDS.

Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CollectTrace().

Here is the caller graph for this function:

◆ Filter()

const gpu::GraphTraceFilter & bicameral::frame::TraceCapture::Filter ( ) const
inlinenodiscard

Definition at line 38 of file trace_capture.h.

References m_filter.

◆ IsComplete()

bool bicameral::frame::TraceCapture::IsComplete ( uint64_t latestStateTick) const
nodiscard

Definition at line 24 of file trace_capture.cpp.

References m_filter.

Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CollectTrace().

Here is the caller graph for this function:

◆ Path()

const fs::path & bicameral::frame::TraceCapture::Path ( ) const
inlinenodiscard

Definition at line 37 of file trace_capture.h.

References m_path.

◆ Write()

std::expected< void, std::string > bicameral::frame::TraceCapture::Write ( )
nodiscard

Definition at line 31 of file trace_capture.cpp.

References bicameral::Info, bicameral::Log(), m_droppedCount, m_filter, m_path, m_records, bicameral::Sim, bicameral::ToUtf8(), bicameral::Warning, and bicameral::sim::WriteProbeTraceFile().

Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CollectTrace().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_droppedCount

uint64_t bicameral::frame::TraceCapture::m_droppedCount = 0
private

Definition at line 44 of file trace_capture.h.

Referenced by Add(), and Write().

◆ m_filter

gpu::GraphTraceFilter bicameral::frame::TraceCapture::m_filter
private

Definition at line 42 of file trace_capture.h.

Referenced by Filter(), IsComplete(), TraceCapture(), and Write().

◆ m_path

fs::path bicameral::frame::TraceCapture::m_path
private

Definition at line 41 of file trace_capture.h.

Referenced by Path(), TraceCapture(), and Write().

◆ m_records

std::vector<gpu::GraphTraceRecord> bicameral::frame::TraceCapture::m_records
private

Definition at line 43 of file trace_capture.h.

Referenced by Add(), and Write().

◆ MAX_RECORDS

size_t bicameral::frame::TraceCapture::MAX_RECORDS = size_t{1} << 22
staticconstexpr

Definition at line 22 of file trace_capture.h.

Referenced by Add().


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