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

#include <gpu_lab_box.h>

Collaboration diagram for bicameral::sim::GpuLabBox:
[legend]

Public Member Functions

bool RecordUpload (ID3D12GraphicsCommandList10 *list, const MultiresNest &nest)
bool RecordTick (ID3D12GraphicsCommandList10 *list, D3D12_GPU_VIRTUAL_ADDRESS debugRing, uint64_t tick, std::span< const Command > commands)
void RecordReadback (ID3D12GraphicsCommandList10 *list)
bool Read (MultiresNest &nest) const

Static Public Member Functions

static std::expected< GpuLabBox, std::string > Create (ID3D12Device5 *device, const BakedReactionTable &table)

Private Member Functions

 GpuLabBox (GpuMultires nest)
bool RecordCommandUpload (ID3D12GraphicsCommandList10 *list, std::span< const Command > commands)

Private Attributes

GpuMultires m_nest
ComPtr< ID3D12PipelineState > m_applyPipeline
ComPtr< ID3D12Resource > m_commands
ComPtr< ID3D12Resource > m_commandUpload
uint32_t m_speciesCount = 0

Detailed Description

Definition at line 23 of file gpu_lab_box.h.

Constructor & Destructor Documentation

◆ GpuLabBox()

bicameral::sim::GpuLabBox::GpuLabBox ( GpuMultires nest)
inlineexplicitprivate

Definition at line 39 of file gpu_lab_box.h.

References m_nest.

Referenced by Create().

Here is the caller graph for this function:

Member Function Documentation

◆ Create()

std::expected< GpuLabBox, std::string > bicameral::sim::GpuLabBox::Create ( ID3D12Device5 * device,
const BakedReactionTable & table )
staticnodiscard

Definition at line 10 of file gpu_lab_box.cpp.

References bicameral::sim::COMMAND_BYTES, bicameral::sim::GpuMultires::Create(), bicameral::gpu::CreateBuffer(), bicameral::gpu::CreateComputePipeline(), GpuLabBox(), bicameral::sim::LAB_MAX_COMMANDS_PER_TICK, bicameral::sim::LabBoxCapacity(), bicameral::gpu::LoadShader(), m_applyPipeline, m_commands, m_commandUpload, m_nest, m_speciesCount, bicameral::sim::GpuMultires::RootSignature(), bicameral::sim::BakedReactionTable::species, bicameral::gpu::UnorderedAccess, and bicameral::gpu::Upload.

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

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

◆ Read()

bool bicameral::sim::GpuLabBox::Read ( MultiresNest & nest) const
inlinenodiscard

Definition at line 36 of file gpu_lab_box.h.

References m_nest.

◆ RecordCommandUpload()

bool bicameral::sim::GpuLabBox::RecordCommandUpload ( ID3D12GraphicsCommandList10 * list,
std::span< const Command > commands )
nodiscardprivate

Definition at line 40 of file gpu_lab_box.cpp.

References m_commands, m_commandUpload, and bicameral::gpu::Transition().

Referenced by RecordTick().

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

◆ RecordReadback()

void bicameral::sim::GpuLabBox::RecordReadback ( ID3D12GraphicsCommandList10 * list)
inline

Definition at line 35 of file gpu_lab_box.h.

References m_nest.

◆ RecordTick()

bool bicameral::sim::GpuLabBox::RecordTick ( ID3D12GraphicsCommandList10 * list,
D3D12_GPU_VIRTUAL_ADDRESS debugRing,
uint64_t tick,
std::span< const Command > commands )
nodiscard

Definition at line 58 of file gpu_lab_box.cpp.

References bicameral::sim::LAB_MAX_COMMANDS_PER_TICK, bicameral::sim::LAB_STEP_OPTIONS, bicameral::sim::LAB_WORLD_SEED, m_applyPipeline, m_commands, m_nest, and RecordCommandUpload().

Here is the call graph for this function:

◆ RecordUpload()

bool bicameral::sim::GpuLabBox::RecordUpload ( ID3D12GraphicsCommandList10 * list,
const MultiresNest & nest )
nodiscard

Definition at line 36 of file gpu_lab_box.cpp.

References m_nest.

Member Data Documentation

◆ m_applyPipeline

ComPtr<ID3D12PipelineState> bicameral::sim::GpuLabBox::m_applyPipeline
private

Definition at line 44 of file gpu_lab_box.h.

Referenced by Create(), and RecordTick().

◆ m_commands

ComPtr<ID3D12Resource> bicameral::sim::GpuLabBox::m_commands
private

Definition at line 45 of file gpu_lab_box.h.

Referenced by Create(), RecordCommandUpload(), and RecordTick().

◆ m_commandUpload

ComPtr<ID3D12Resource> bicameral::sim::GpuLabBox::m_commandUpload
private

Definition at line 46 of file gpu_lab_box.h.

Referenced by Create(), and RecordCommandUpload().

◆ m_nest

GpuMultires bicameral::sim::GpuLabBox::m_nest
private

Definition at line 43 of file gpu_lab_box.h.

Referenced by Create(), GpuLabBox(), Read(), RecordReadback(), RecordTick(), and RecordUpload().

◆ m_speciesCount

uint32_t bicameral::sim::GpuLabBox::m_speciesCount = 0
private

Definition at line 47 of file gpu_lab_box.h.

Referenced by Create().


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