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

#include <work_graph.h>

Public Member Functions

uint32_t EntrypointIndex (std::wstring_view nodeName) const
void SetProgram (ID3D12GraphicsCommandList10 *list, bool initialize) const
uint64_t BackingMemoryBytes () const

Static Public Member Functions

static std::expected< WorkGraph, std::string > Create (ID3D12Device5 *device, ID3D12RootSignature *globalRootSignature, std::span< const std::byte > library, std::wstring_view programName)
static void DispatchFromCpu (ID3D12GraphicsCommandList10 *list, uint32_t entrypointIndex, const void *records, uint32_t recordCount, uint64_t recordStrideBytes)
static void DispatchFromGpu (ID3D12GraphicsCommandList10 *list, D3D12_GPU_VIRTUAL_ADDRESS nodeGpuInput)

Private Member Functions

 WorkGraph ()=default

Private Attributes

ComPtr< ID3D12StateObject > m_stateObject
ComPtr< ID3D12WorkGraphProperties > m_properties
D3D12_PROGRAM_IDENTIFIER m_programIdentifier {}
uint32_t m_graphIndex = 0
ComPtr< ID3D12Resource > m_backingMemory
uint64_t m_backingMemoryBytes = 0

Detailed Description

Definition at line 23 of file work_graph.h.

Constructor & Destructor Documentation

◆ WorkGraph()

bicameral::gpu::WorkGraph::WorkGraph ( )
privatedefault

Referenced by Create().

Here is the caller graph for this function:

Member Function Documentation

◆ BackingMemoryBytes()

uint64_t bicameral::gpu::WorkGraph::BackingMemoryBytes ( ) const
inlinenodiscard

Definition at line 45 of file work_graph.h.

References m_backingMemoryBytes.

◆ Create()

std::expected< WorkGraph, std::string > bicameral::gpu::WorkGraph::Create ( ID3D12Device5 * device,
ID3D12RootSignature * globalRootSignature,
std::span< const std::byte > library,
std::wstring_view programName )
staticnodiscard

Definition at line 35 of file work_graph.cpp.

References bicameral::gpu::CreateBuffer(), bicameral::Info, bicameral::Log(), m_backingMemory, m_backingMemoryBytes, m_graphIndex, m_programIdentifier, m_properties, m_stateObject, bicameral::ToUtf8(), bicameral::gpu::UnorderedAccess, bicameral::WorkGraph, and WorkGraph().

Referenced by bicameral::sim::ProbeSim::CreateConductGraph(), bicameral::sim::GpuMultires::CreateConductionGraph(), bicameral::sim::GpuMultires::CreatePipelines(), and bicameral::sim::GpuPhysics::CreatePipelines().

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

◆ DispatchFromCpu()

void bicameral::gpu::WorkGraph::DispatchFromCpu ( ID3D12GraphicsCommandList10 * list,
uint32_t entrypointIndex,
const void * records,
uint32_t recordCount,
uint64_t recordStrideBytes )
static

Definition at line 86 of file work_graph.cpp.

Referenced by bicameral::sim::GpuMultires::DispatchGraph(), bicameral::sim::GpuPhysics::RecordBroadphaseGraph(), and bicameral::sim::GpuMultires::RecordStepActive().

Here is the caller graph for this function:

◆ DispatchFromGpu()

void bicameral::gpu::WorkGraph::DispatchFromGpu ( ID3D12GraphicsCommandList10 * list,
D3D12_GPU_VIRTUAL_ADDRESS nodeGpuInput )
static

◆ EntrypointIndex()

uint32_t bicameral::gpu::WorkGraph::EntrypointIndex ( std::wstring_view nodeName) const
nodiscard

Definition at line 69 of file work_graph.cpp.

References m_graphIndex, and m_properties.

◆ SetProgram()

void bicameral::gpu::WorkGraph::SetProgram ( ID3D12GraphicsCommandList10 * list,
bool initialize ) const

Definition at line 74 of file work_graph.cpp.

References m_backingMemory, m_backingMemoryBytes, and m_programIdentifier.

Member Data Documentation

◆ m_backingMemory

ComPtr<ID3D12Resource> bicameral::gpu::WorkGraph::m_backingMemory
private

Definition at line 57 of file work_graph.h.

Referenced by Create(), and SetProgram().

◆ m_backingMemoryBytes

uint64_t bicameral::gpu::WorkGraph::m_backingMemoryBytes = 0
private

Definition at line 58 of file work_graph.h.

Referenced by BackingMemoryBytes(), Create(), and SetProgram().

◆ m_graphIndex

uint32_t bicameral::gpu::WorkGraph::m_graphIndex = 0
private

Definition at line 54 of file work_graph.h.

Referenced by Create(), and EntrypointIndex().

◆ m_programIdentifier

D3D12_PROGRAM_IDENTIFIER bicameral::gpu::WorkGraph::m_programIdentifier {}
private

Definition at line 53 of file work_graph.h.

Referenced by Create(), and SetProgram().

◆ m_properties

ComPtr<ID3D12WorkGraphProperties> bicameral::gpu::WorkGraph::m_properties
private

Definition at line 52 of file work_graph.h.

Referenced by Create(), and EntrypointIndex().

◆ m_stateObject

ComPtr<ID3D12StateObject> bicameral::gpu::WorkGraph::m_stateObject
private

Definition at line 51 of file work_graph.h.

Referenced by Create().


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