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

Namespaces

namespace  anonymous_namespace{debug_ring.cpp}
namespace  anonymous_namespace{device.cpp}
namespace  anonymous_namespace{graph_trace.cpp}
namespace  anonymous_namespace{swap_chain.cpp}
namespace  anonymous_namespace{work_graph.cpp}
namespace  anonymous_namespace{work_graph_stats.cpp}

Classes

struct  DebugArgument
struct  DebugMessage
struct  DebugRingContents
class  DebugRing
struct  DeviceOptions
class  Device
struct  DeviceRemovedReport
struct  GraphTraceFilter
struct  GraphTraceRecord
struct  GraphTraceFrame
class  GraphTrace
class  ImmediateQueue
class  Queue
class  ReadbackRing
struct  RootSignatureLayout
class  SwapChain
class  WorkGraph
struct  GraphNodeLimits
struct  GraphGaugeLimits
struct  GraphStatsLayout
struct  GraphNodeCounters
struct  GraphStatsSnapshot
struct  GraphFinding
class  WorkGraphStats

Enumerations

enum class  AdapterKind : uint8_t { Hardware , Warp }
enum class  BufferKind : uint8_t { UnorderedAccess , Readback , Upload }
enum class  GraphFindingKind : uint8_t {
  OutputsRefused , OutputsNearLimit , RecursionRefused , RecursionNearLimit ,
  GaugeOverCapacity , GaugeNearCapacity , Count
}

Functions

DebugMessage DecodeDebugRecord (std::span< const uint32_t, DEBUG_RECORD_WORDS > record)
const char * AdapterKindName (AdapterKind kind)
DeviceOptions DefaultDeviceOptions ()
DeviceRemovedReport LogDeviceRemoved (ID3D12Device *device)
void SortGraphTrace (std::vector< GraphTraceRecord > &records)
ComPtr< ID3D12Resource > CreateBuffer (ID3D12Device *device, uint64_t sizeBytes, BufferKind kind)
bool ReadBuffer (ID3D12Resource *readback, std::span< std::byte > destination)
D3D12_RESOURCE_BARRIER Transition (ID3D12Resource *resource, D3D12_RESOURCE_STATES before, D3D12_RESOURCE_STATES after)
D3D12_RESOURCE_BARRIER UavBarrier (ID3D12Resource *resource)
void RecordCopyToReadback (ID3D12GraphicsCommandList *list, ID3D12Resource *source, ID3D12Resource *readback)
ComPtr< ID3D12RootSignature > CreateRootSignature (ID3D12Device *device, const RootSignatureLayout &layout)
ComPtr< ID3D12PipelineState > CreateComputePipeline (ID3D12Device *device, ID3D12RootSignature *rootSignature, std::span< const std::byte > bytecode)
std::expected< std::vector< std::byte >, std::string > LoadShader (std::string_view relativePath)
void AccumulateGraphStats (GraphStatsSnapshot &total, const GraphStatsSnapshot &frame)
std::string FormatGraphStats (const GraphStatsLayout &layout, const GraphStatsSnapshot &snapshot)
std::vector< GraphFinding > EvaluateGraphStats (const GraphStatsLayout &layout, const GraphStatsSnapshot &snapshot)

Enumeration Type Documentation

◆ AdapterKind

enum class bicameral::gpu::AdapterKind : uint8_t
strong
Enumerator
Hardware 
Warp 

Definition at line 22 of file device.h.

◆ BufferKind

enum class bicameral::gpu::BufferKind : uint8_t
strong
Enumerator
UnorderedAccess 
Readback 
Upload 

Definition at line 18 of file resources.h.

◆ GraphFindingKind

enum class bicameral::gpu::GraphFindingKind : uint8_t
strong
Enumerator
OutputsRefused 
OutputsNearLimit 
RecursionRefused 
RecursionNearLimit 
GaugeOverCapacity 
GaugeNearCapacity 
Count 

Definition at line 81 of file work_graph_stats.h.

Function Documentation

◆ AccumulateGraphStats()

◆ AdapterKindName()

const char * bicameral::gpu::AdapterKindName ( AdapterKind kind)
nodiscard

Definition at line 299 of file device.cpp.

References Warp.

◆ CreateBuffer()

◆ CreateComputePipeline()

ComPtr< ID3D12PipelineState > bicameral::gpu::CreateComputePipeline ( ID3D12Device * device,
ID3D12RootSignature * rootSignature,
std::span< const std::byte > bytecode )
nodiscard

◆ CreateRootSignature()

ComPtr< ID3D12RootSignature > bicameral::gpu::CreateRootSignature ( ID3D12Device * device,
const RootSignatureLayout & layout )
nodiscard

◆ DecodeDebugRecord()

DebugMessage bicameral::gpu::DecodeDebugRecord ( std::span< const uint32_t, DEBUG_RECORD_WORDS > record)
nodiscard

Definition at line 139 of file debug_ring.cpp.

References bicameral::gpu::DebugMessage::channel, bicameral::gpu::DebugMessage::format, bicameral::gpu::DebugMessage::isAssert, bicameral::gpu::DebugMessage::line, bicameral::gpu::DebugMessage::text, and bicameral::gpu::DebugMessage::where.

Referenced by bicameral::gpu::DebugRing::Drain().

Here is the caller graph for this function:

◆ DefaultDeviceOptions()

DeviceOptions bicameral::gpu::DefaultDeviceOptions ( )
nodiscard

Definition at line 303 of file device.cpp.

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

Here is the caller graph for this function:

◆ EvaluateGraphStats()

std::vector< GraphFinding > bicameral::gpu::EvaluateGraphStats ( const GraphStatsLayout & layout,
const GraphStatsSnapshot & snapshot )
nodiscard

Definition at line 136 of file work_graph_stats.cpp.

References bicameral::gpu::GraphStatsSnapshot::gaugePeaks, bicameral::gpu::GraphStatsLayout::gauges, bicameral::gpu::GraphStatsLayout::nodes, and bicameral::gpu::GraphStatsSnapshot::nodes.

Referenced by bicameral::editor::anonymous_namespace{graph_panel.cpp}::BuildFindings(), and bicameral::gpu::WorkGraphStats::Report().

Here is the caller graph for this function:

◆ FormatGraphStats()

◆ LoadShader()

std::expected< std::vector< std::byte >, std::string > bicameral::gpu::LoadShader ( std::string_view relativePath)
nodiscard

◆ LogDeviceRemoved()

DeviceRemovedReport bicameral::gpu::LogDeviceRemoved ( ID3D12Device * device)

Definition at line 379 of file device.cpp.

References bicameral::gpu::DeviceRemovedReport::breadcrumbListCount, bicameral::DescribeHresult(), bicameral::gpu::DeviceRemovedReport::dredAvailable, bicameral::Error, bicameral::Gpu, bicameral::Log(), bicameral::gpu::DeviceRemovedReport::pageFaultAddress, and bicameral::Warning.

Referenced by bicameral::gpu::ImmediateQueue::ExecuteAndWait(), and bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::Finish().

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

◆ ReadBuffer()

◆ RecordCopyToReadback()

void bicameral::gpu::RecordCopyToReadback ( ID3D12GraphicsCommandList * list,
ID3D12Resource * source,
ID3D12Resource * readback )

Definition at line 78 of file resources.cpp.

Referenced by bicameral::sim::GpuImplicit::RecordCostReadback(), bicameral::sim::GpuImplicit::RecordReadback(), bicameral::sim::GpuMultires::RecordReadback(), bicameral::sim::GpuPhysics::RecordReadback(), and bicameral::sim::ProbeSim::RecordReadbacks().

Here is the caller graph for this function:

◆ SortGraphTrace()

void bicameral::gpu::SortGraphTrace ( std::vector< GraphTraceRecord > & records)

Definition at line 44 of file graph_trace.cpp.

Referenced by bicameral::sim::UniqueProbeTrace(), and bicameral::sim::WriteProbeTraceFile().

Here is the caller graph for this function:

◆ Transition()

D3D12_RESOURCE_BARRIER bicameral::gpu::Transition ( ID3D12Resource * resource,
D3D12_RESOURCE_STATES before,
D3D12_RESOURCE_STATES after )
nodiscard

Definition at line 65 of file resources.cpp.

Referenced by bicameral::sim::anonymous_namespace{probe_save_point.cpp}::AppendTransitions(), bicameral::sim::GpuImplicit::BeginSkippable(), bicameral::sim::GpuImplicitLevels::BeginSkippable(), bicameral::sim::anonymous_namespace{gpu_implicit_build.cpp}::CopyToReadback(), bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::CopyToReadback(), bicameral::sim::GpuImplicit::EndSkippable(), bicameral::sim::GpuImplicitLevels::EndSkippable(), bicameral::render::ProbeView::Record(), bicameral::render::ScreenshotCapture::Record(), bicameral::sim::ProbeSim::RecordActiveListStates(), bicameral::gpu::GraphTrace::RecordBegin(), bicameral::gpu::ReadbackRing::RecordBegin(), bicameral::sim::GpuPhysics::RecordColorListStates(), bicameral::sim::GpuPhysics::RecordColorPredicateStates(), bicameral::sim::GpuLabBox::RecordCommandUpload(), bicameral::sim::ProbeSim::RecordConduct(), bicameral::sim::GpuMultires::RecordConductStage(), bicameral::sim::GpuImplicit::RecordCopies(), bicameral::sim::GpuImplicitBuild::RecordCopyTo(), bicameral::sim::GpuImplicitLevels::RecordCopyTo(), bicameral::sim::GpuImplicit::RecordCostReadback(), bicameral::sim::GpuMultires::RecordExpandPages(), bicameral::sim::ProbeSim::RecordFrame(), bicameral::sim::ProbeSim::RecordInitialization(), bicameral::sim::GpuImplicit::RecordPlan(), bicameral::sim::GpuMultires::RecordProcessRequests(), bicameral::gpu::ReadbackRing::RecordReadbackAndReset(), bicameral::sim::ProbeSim::RecordReadbacks(), bicameral::sim::GpuImplicit::RecordRelease(), bicameral::sim::GpuMultires::RecordRequests(), bicameral::sim::GpuImplicit::RecordReset(), bicameral::sim::GpuImplicit::RecordStep(), bicameral::sim::GpuMultires::RecordStepActive(), bicameral::sim::GpuMultires::RecordSubstepEnd(), bicameral::sim::ProbeSim::RecordTableSwap(), bicameral::sim::GpuImplicit::RecordUpload(), bicameral::sim::GpuMultires::RecordUpload(), and bicameral::editor::EditorOverlay::Submit().

Here is the caller graph for this function:

◆ UavBarrier()

D3D12_RESOURCE_BARRIER bicameral::gpu::UavBarrier ( ID3D12Resource * resource)
nodiscard