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

#include <work_graph_stats.h>

Collaboration diagram for bicameral::gpu::WorkGraphStats:
[legend]

Public Member Functions

D3D12_GPU_VIRTUAL_ADDRESS GpuAddress () const
const GraphStatsLayout & Layout () const
void RecordBegin (ID3D12GraphicsCommandList *list) const
void RecordReadbackAndReset (ID3D12GraphicsCommandList *list, uint32_t slot=0) const
std::expected< GraphStatsSnapshot, std::string > Read (uint32_t slot=0) const
std::vector< GraphFinding > Report (const GraphStatsSnapshot &snapshot)

Static Public Member Functions

static std::expected< WorkGraphStats, std::string > Create (ID3D12Device *device, GraphStatsLayout layout, uint32_t slotCount=1)

Static Public Attributes

static constexpr uint64_t WARNING_REPEAT_REPORTS = 600

Private Member Functions

 WorkGraphStats (ReadbackRing &&ring, GraphStatsLayout &&layout)

Private Attributes

ReadbackRing m_ring
GraphStatsLayout m_layout
uint64_t m_reportCount = 0
std::vector< uint64_t > m_lastWarnedReport

Detailed Description

Definition at line 101 of file work_graph_stats.h.

Constructor & Destructor Documentation

◆ WorkGraphStats()

bicameral::gpu::WorkGraphStats::WorkGraphStats ( ReadbackRing && ring,
GraphStatsLayout && layout )
private

Definition at line 149 of file work_graph_stats.cpp.

References m_lastWarnedReport, m_layout, and m_ring.

Referenced by Create().

Here is the caller graph for this function:

Member Function Documentation

◆ Create()

std::expected< WorkGraphStats, std::string > bicameral::gpu::WorkGraphStats::Create ( ID3D12Device * device,
GraphStatsLayout layout,
uint32_t slotCount = 1 )
staticnodiscard

Definition at line 154 of file work_graph_stats.cpp.

References bicameral::gpu::ReadbackRing::Create(), bicameral::gpu::GraphStatsLayout::gauges, bicameral::gpu::GraphStatsLayout::name, bicameral::gpu::GraphStatsLayout::nodes, and WorkGraphStats().

Referenced by bicameral::sim::ProbeSim::Create().

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

◆ GpuAddress()

D3D12_GPU_VIRTUAL_ADDRESS bicameral::gpu::WorkGraphStats::GpuAddress ( ) const
inlinenodiscard

Definition at line 111 of file work_graph_stats.h.

References m_ring.

◆ Layout()

const GraphStatsLayout & bicameral::gpu::WorkGraphStats::Layout ( ) const
inlinenodiscard

Definition at line 112 of file work_graph_stats.h.

References m_layout.

◆ Read()

std::expected< GraphStatsSnapshot, std::string > bicameral::gpu::WorkGraphStats::Read ( uint32_t slot = 0) const
nodiscard

◆ RecordBegin()

void bicameral::gpu::WorkGraphStats::RecordBegin ( ID3D12GraphicsCommandList * list) const

Definition at line 170 of file work_graph_stats.cpp.

References m_ring.

◆ RecordReadbackAndReset()

void bicameral::gpu::WorkGraphStats::RecordReadbackAndReset ( ID3D12GraphicsCommandList * list,
uint32_t slot = 0 ) const

Definition at line 174 of file work_graph_stats.cpp.

References m_ring.

◆ Report()

std::vector< GraphFinding > bicameral::gpu::WorkGraphStats::Report ( const GraphStatsSnapshot & snapshot)

Definition at line 195 of file work_graph_stats.cpp.

References bicameral::gpu::EvaluateGraphStats(), bicameral::gpu::FormatGraphStats(), bicameral::GetLogger(), bicameral::Log(), m_lastWarnedReport, m_layout, m_reportCount, bicameral::Trace, bicameral::Warning, WARNING_REPEAT_REPORTS, and bicameral::WorkGraph.

Here is the call graph for this function:

Member Data Documentation

◆ m_lastWarnedReport

std::vector<uint64_t> bicameral::gpu::WorkGraphStats::m_lastWarnedReport
private

Definition at line 133 of file work_graph_stats.h.

Referenced by Report(), and WorkGraphStats().

◆ m_layout

GraphStatsLayout bicameral::gpu::WorkGraphStats::m_layout
private

Definition at line 130 of file work_graph_stats.h.

Referenced by Layout(), Read(), Report(), and WorkGraphStats().

◆ m_reportCount

uint64_t bicameral::gpu::WorkGraphStats::m_reportCount = 0
private

Definition at line 131 of file work_graph_stats.h.

Referenced by Report().

◆ m_ring

ReadbackRing bicameral::gpu::WorkGraphStats::m_ring
private

◆ WARNING_REPEAT_REPORTS

uint64_t bicameral::gpu::WorkGraphStats::WARNING_REPEAT_REPORTS = 600
staticconstexpr

Definition at line 104 of file work_graph_stats.h.

Referenced by Report().


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