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

#include <graph_trace.h>

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

Public Member Functions

D3D12_GPU_VIRTUAL_ADDRESS GpuAddress () const
const GraphTraceFilter & Filter () const
bool Enabled () const
uint32_t Capacity () const
void SetFilter (const GraphTraceFilter &filter)
void RecordBegin (ID3D12GraphicsCommandList *list, uint32_t slot=0)
void RecordReadbackAndReset (ID3D12GraphicsCommandList *list, uint32_t slot=0) const
std::expected< GraphTraceFrame, std::string > Read (uint32_t slot=0) const

Static Public Member Functions

static std::expected< GraphTrace, std::string > Create (ID3D12Device *device, const GraphTraceFilter &filter, uint32_t slotCount=1, uint32_t capacity=0)

Private Member Functions

 GraphTrace (ReadbackRing &&ring, ComPtr< ID3D12Resource > filterUpload, std::byte *filterMapped, uint32_t capacity, uint32_t slotCount)

Private Attributes

ReadbackRing m_ring
ComPtr< ID3D12Resource > m_filterUpload
std::byte * m_filterMapped = nullptr
uint32_t m_capacity = 0
GraphTraceFilter m_filter
bool m_filterDirty = true
std::vector< GraphTraceFilter > m_slotFilters

Detailed Description

Definition at line 65 of file graph_trace.h.

Constructor & Destructor Documentation

◆ GraphTrace()

bicameral::gpu::GraphTrace::GraphTrace ( ReadbackRing && ring,
ComPtr< ID3D12Resource > filterUpload,
std::byte * filterMapped,
uint32_t capacity,
uint32_t slotCount )
inlineprivate

Definition at line 94 of file graph_trace.h.

References m_capacity, m_filterMapped, m_filterUpload, m_ring, and m_slotFilters.

Referenced by Create().

Here is the caller graph for this function:

Member Function Documentation

◆ Capacity()

uint32_t bicameral::gpu::GraphTrace::Capacity ( ) const
inlinenodiscard

Definition at line 78 of file graph_trace.h.

References m_capacity.

◆ Create()

std::expected< GraphTrace, std::string > bicameral::gpu::GraphTrace::Create ( ID3D12Device * device,
const GraphTraceFilter & filter,
uint32_t slotCount = 1,
uint32_t capacity = 0 )
staticnodiscard

Definition at line 48 of file graph_trace.cpp.

References bicameral::gpu::GraphTraceFilter::capacity, bicameral::gpu::ReadbackRing::Create(), bicameral::gpu::CreateBuffer(), bicameral::gpu::GraphTraceFilter::enabled, GraphTrace(), SetFilter(), and bicameral::gpu::Upload.

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

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

◆ Enabled()

bool bicameral::gpu::GraphTrace::Enabled ( ) const
inlinenodiscard

Definition at line 77 of file graph_trace.h.

References m_filter.

◆ Filter()

const GraphTraceFilter & bicameral::gpu::GraphTrace::Filter ( ) const
inlinenodiscard

Definition at line 76 of file graph_trace.h.

References m_filter.

◆ GpuAddress()

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

Definition at line 75 of file graph_trace.h.

References m_ring.

◆ Read()

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

Definition at line 113 of file graph_trace.cpp.

References m_ring, and m_slotFilters.

◆ RecordBegin()

void bicameral::gpu::GraphTrace::RecordBegin ( ID3D12GraphicsCommandList * list,
uint32_t slot = 0 )

Definition at line 82 of file graph_trace.cpp.

References m_filter, m_filterDirty, m_filterMapped, m_filterUpload, m_ring, m_slotFilters, and bicameral::gpu::Transition().

Here is the call graph for this function:

◆ RecordReadbackAndReset()

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

Definition at line 107 of file graph_trace.cpp.

References m_ring, and m_slotFilters.

◆ SetFilter()

void bicameral::gpu::GraphTrace::SetFilter ( const GraphTraceFilter & filter)

Definition at line 76 of file graph_trace.cpp.

References bicameral::gpu::GraphTraceFilter::capacity, bicameral::gpu::GraphTraceFilter::enabled, m_capacity, m_filter, and m_filterDirty.

Referenced by Create().

Here is the caller graph for this function:

Member Data Documentation

◆ m_capacity

uint32_t bicameral::gpu::GraphTrace::m_capacity = 0
private

Definition at line 106 of file graph_trace.h.

Referenced by Capacity(), GraphTrace(), and SetFilter().

◆ m_filter

GraphTraceFilter bicameral::gpu::GraphTrace::m_filter
private

Definition at line 109 of file graph_trace.h.

Referenced by Enabled(), Filter(), RecordBegin(), and SetFilter().

◆ m_filterDirty

bool bicameral::gpu::GraphTrace::m_filterDirty = true
private

Definition at line 110 of file graph_trace.h.

Referenced by RecordBegin(), and SetFilter().

◆ m_filterMapped

std::byte* bicameral::gpu::GraphTrace::m_filterMapped = nullptr
private

Definition at line 105 of file graph_trace.h.

Referenced by GraphTrace(), and RecordBegin().

◆ m_filterUpload

ComPtr<ID3D12Resource> bicameral::gpu::GraphTrace::m_filterUpload
private

Definition at line 104 of file graph_trace.h.

Referenced by GraphTrace(), and RecordBegin().

◆ m_ring

ReadbackRing bicameral::gpu::GraphTrace::m_ring
private

Definition at line 103 of file graph_trace.h.

Referenced by GpuAddress(), GraphTrace(), Read(), RecordBegin(), and RecordReadbackAndReset().

◆ m_slotFilters

std::vector<GraphTraceFilter> bicameral::gpu::GraphTrace::m_slotFilters
private

Definition at line 111 of file graph_trace.h.

Referenced by GraphTrace(), Read(), RecordBegin(), and RecordReadbackAndReset().


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