|
Bicameral Engine
GPU-resident engine for a magic-research open-world game
|
Classes | |
| struct | EventRingHeader |
| struct | ReferenceGeneration |
Functions | |
| gpu::GraphStatsLayout | MakeConductStatsLayout () |
| template<typename T> | |
| void | WriteAt (std::byte *base, uint32_t offset, const T &value) |
| template<typename T> | |
| ComPtr< ID3D12Resource > | CreateFilledUpload (ID3D12Device *device, const std::vector< T > &data, const wchar_t *name) |
| ComPtr< ID3D12PipelineState > | LoadComputePipeline (ID3D12Device *device, ID3D12RootSignature *rootSignature, std::string_view shaderPath) |
| void | SetUnitConstants (ID3D12GraphicsCommandList10 *list, uint64_t tick, uint32_t argument) |
| bool | InCrate (uint32_t value) |
| bool | OnCrateWall (uint32_t value) |
| bool | IsCrateWall (uint32_t x, uint32_t y, uint32_t z) |
| void | MarkWithNeighbors (std::vector< uint8_t > &scheduled, uint32_t block) |
| std::vector< uint8_t > | ScheduleBlocks (std::span< const uint8_t > seeds) |
| uint32_t | CountWokenBlocks (std::span< const uint8_t > flags, std::span< const uint8_t > previousScheduled) |
| uint64_t | ApplyPokes (const ReactionTableView &table, ReferenceGeneration current, uint64_t tick, std::span< const ProbeCommand > commands, std::vector< uint8_t > &seeds, std::vector< uint64_t > &changedMarks) |
| ProbeCellStep | ReferenceStepCell (const ReactionTableView &table, ReferenceGeneration current, uint32_t index, uint64_t tick, uint64_t changedMark) |
| uint32_t | BlockOfCellIndex (uint32_t index) |
Variables | |
| constexpr gpu::RootSignatureLayout | ROOT_LAYOUT |
| constexpr uint32_t | UAV_CELLS = 0 |
| constexpr uint32_t | UAV_EVENTS = 1 |
| constexpr uint32_t | UAV_EXTRACTION0 = 2 |
| constexpr uint32_t | UAV_EXTRACTION1 = 3 |
| constexpr uint32_t | UAV_BUSY_SINK = 4 |
| constexpr uint32_t | UAV_EXTRACTION2 = 5 |
| constexpr uint32_t | UAV_HASHES = 6 |
| constexpr uint32_t | UAV_COMMAND_QUEUE = 7 |
| constexpr uint32_t | UAV_TICK_EVENTS = 8 |
| constexpr uint32_t | UAV_ACTIVE_LIST0 = 9 |
| constexpr uint32_t | UAV_ACTIVE_LIST1 = 10 |
| constexpr uint32_t | UAV_BLOCK_SCHEDULE = 11 |
| constexpr uint32_t | UAV_THERMAL = 12 |
| constexpr uint32_t | UAV_BODIES = 13 |
| constexpr uint32_t | SRV_INPUT = 0 |
| constexpr uint32_t | SRV_REACTION_FIRST = 1 |
| constexpr uint32_t | TIMESTAMPS_PER_SLOT = ProbeSim::MAX_UNITS_PER_FRAME + 2 |
| constexpr uint64_t | CELL_BYTES = uint64_t{PROBE_CELL_COUNT} * sizeof(reaction::RxCell) |
| constexpr uint64_t | THERMAL_BYTES = uint64_t{PROBE_CELL_COUNT} * sizeof(reaction::HcThermalCache) |
| constexpr uint32_t | SLICE_BYTES = PROBE_SLICE_CELL_COUNT * 4 |
| constexpr uint32_t | BUSY_GROUPS = PROBE_GRID_SIZE / PROBE_GROUP_SIZE |
| constexpr uint32_t | LINEAR_CELL_GROUPS = PROBE_CELL_COUNT / PROBE_LINEAR_GROUP_SIZE |
| constexpr uint32_t | BLOCK_GROUPS = (PROBE_BLOCK_COUNT + PROBE_LINEAR_GROUP_SIZE - 1) / PROBE_LINEAR_GROUP_SIZE |
| constexpr uint32_t | EXTRACTION_BYTES = PROBE_EXTRACTION_WORDS * 4 |
| constexpr uint32_t | MAX_LOGGED_DEBUG_MESSAGES = 8 |
| constexpr uint64_t | AIR_OXYGEN_MICROMOLES = 1063800 |
| constexpr uint64_t | AIR_NITROGEN_MICROMOLES = 4014200 |
| constexpr uint64_t | CRATE_CELLULOSE_MICROMOLES = 38600000 |
| constexpr uint64_t | CRATE_OXYGEN_MICROMOLES = 983000 |
| constexpr uint64_t | CRATE_NITROGEN_MICROMOLES = 3697000 |
| constexpr int32_t | INITIAL_TEMPERATURE_MILLIKELVIN = 300000 |
| constexpr uint32_t | CRATE_SIZE = 8 |
| constexpr uint32_t | CRATE_BEGIN = (PROBE_GRID_SIZE - CRATE_SIZE) / 2 |
| constexpr uint32_t | CRATE_END = CRATE_BEGIN + CRATE_SIZE |
| uint64_t bicameral::sim::anonymous_namespace{probe_sim.cpp}::ApplyPokes | ( | const ReactionTableView & | table, |
| ReferenceGeneration | current, | ||
| uint64_t | tick, | ||
| std::span< const ProbeCommand > | commands, | ||
| std::vector< uint8_t > & | seeds, | ||
| std::vector< uint64_t > & | changedMarks ) |
Definition at line 1068 of file probe_sim.cpp.
References ApplyPokes(), bicameral::sim::anonymous_namespace{probe_sim.cpp}::ReferenceGeneration::caches, and bicameral::sim::anonymous_namespace{probe_sim.cpp}::ReferenceGeneration::cells.
Referenced by ApplyPokes().
| uint32_t bicameral::sim::anonymous_namespace{probe_sim.cpp}::BlockOfCellIndex | ( | uint32_t | index | ) |
Definition at line 1112 of file probe_sim.cpp.
References BlockOfCellIndex().
Referenced by BlockOfCellIndex().
| uint32_t bicameral::sim::anonymous_namespace{probe_sim.cpp}::CountWokenBlocks | ( | std::span< const uint8_t > | flags, |
| std::span< const uint8_t > | previousScheduled ) |
Definition at line 1050 of file probe_sim.cpp.
References CountWokenBlocks().
Referenced by CountWokenBlocks().
| ComPtr< ID3D12Resource > bicameral::sim::anonymous_namespace{probe_sim.cpp}::CreateFilledUpload | ( | ID3D12Device * | device, |
| const std::vector< T > & | data, | ||
| const wchar_t * | name ) |
Definition at line 90 of file probe_sim.cpp.
References bicameral::gpu::CreateBuffer(), CreateFilledUpload(), and bicameral::gpu::Upload.
Referenced by CreateFilledUpload().
| bool bicameral::sim::anonymous_namespace{probe_sim.cpp}::InCrate | ( | uint32_t | value | ) |
Definition at line 968 of file probe_sim.cpp.
References CRATE_BEGIN, CRATE_END, and InCrate().
Referenced by InCrate(), and IsCrateWall().
| bool bicameral::sim::anonymous_namespace{probe_sim.cpp}::IsCrateWall | ( | uint32_t | x, |
| uint32_t | y, | ||
| uint32_t | z ) |
Definition at line 976 of file probe_sim.cpp.
References InCrate(), IsCrateWall(), and OnCrateWall().
Referenced by IsCrateWall().
| ComPtr< ID3D12PipelineState > bicameral::sim::anonymous_namespace{probe_sim.cpp}::LoadComputePipeline | ( | ID3D12Device * | device, |
| ID3D12RootSignature * | rootSignature, | ||
| std::string_view | shaderPath ) |
Definition at line 112 of file probe_sim.cpp.
References bicameral::gpu::CreateComputePipeline(), bicameral::Error, LoadComputePipeline(), bicameral::gpu::LoadShader(), bicameral::Log(), and bicameral::Sim.
Referenced by LoadComputePipeline().
| gpu::GraphStatsLayout bicameral::sim::anonymous_namespace{probe_sim.cpp}::MakeConductStatsLayout | ( | ) |
Definition at line 69 of file probe_sim.cpp.
References bicameral::gpu::GraphStatsLayout::gauges, MakeConductStatsLayout(), and bicameral::gpu::GraphStatsLayout::nodes.
Referenced by MakeConductStatsLayout().
| void bicameral::sim::anonymous_namespace{probe_sim.cpp}::MarkWithNeighbors | ( | std::vector< uint8_t > & | scheduled, |
| uint32_t | block ) |
Definition at line 1018 of file probe_sim.cpp.
References MarkWithNeighbors().
Referenced by MarkWithNeighbors(), and ScheduleBlocks().
| bool bicameral::sim::anonymous_namespace{probe_sim.cpp}::OnCrateWall | ( | uint32_t | value | ) |
Definition at line 972 of file probe_sim.cpp.
References CRATE_BEGIN, CRATE_END, and OnCrateWall().
Referenced by IsCrateWall(), and OnCrateWall().
| ProbeCellStep bicameral::sim::anonymous_namespace{probe_sim.cpp}::ReferenceStepCell | ( | const ReactionTableView & | table, |
| ReferenceGeneration | current, | ||
| uint32_t | index, | ||
| uint64_t | tick, | ||
| uint64_t | changedMark ) |
Definition at line 1095 of file probe_sim.cpp.
References bicameral::sim::anonymous_namespace{probe_sim.cpp}::ReferenceGeneration::caches, bicameral::sim::anonymous_namespace{probe_sim.cpp}::ReferenceGeneration::cells, and ReferenceStepCell().
Referenced by ReferenceStepCell().
| std::vector< uint8_t > bicameral::sim::anonymous_namespace{probe_sim.cpp}::ScheduleBlocks | ( | std::span< const uint8_t > | seeds | ) |
Definition at line 1039 of file probe_sim.cpp.
References MarkWithNeighbors(), and ScheduleBlocks().
Referenced by ScheduleBlocks().
| void bicameral::sim::anonymous_namespace{probe_sim.cpp}::SetUnitConstants | ( | ID3D12GraphicsCommandList10 * | list, |
| uint64_t | tick, | ||
| uint32_t | argument ) |
Definition at line 124 of file probe_sim.cpp.
References ROOT_LAYOUT, and SetUnitConstants().
Referenced by SetUnitConstants().
| void bicameral::sim::anonymous_namespace{probe_sim.cpp}::WriteAt | ( | std::byte * | base, |
| uint32_t | offset, | ||
| const T & | value ) |
Definition at line 84 of file probe_sim.cpp.
References WriteAt().
Referenced by WriteAt().
|
constexpr |
Definition at line 953 of file probe_sim.cpp.
|
constexpr |
Definition at line 952 of file probe_sim.cpp.
|
constexpr |
Definition at line 51 of file probe_sim.cpp.
|
constexpr |
Definition at line 49 of file probe_sim.cpp.
|
constexpr |
Definition at line 46 of file probe_sim.cpp.
|
constexpr |
Definition at line 965 of file probe_sim.cpp.
Referenced by InCrate(), and OnCrateWall().
|
constexpr |
Definition at line 957 of file probe_sim.cpp.
|
constexpr |
Definition at line 966 of file probe_sim.cpp.
Referenced by InCrate(), and OnCrateWall().
|
constexpr |
Definition at line 959 of file probe_sim.cpp.
|
constexpr |
Definition at line 958 of file probe_sim.cpp.
|
constexpr |
Definition at line 964 of file probe_sim.cpp.
|
constexpr |
Definition at line 52 of file probe_sim.cpp.
|
constexpr |
Definition at line 961 of file probe_sim.cpp.
|
constexpr |
Definition at line 50 of file probe_sim.cpp.
|
constexpr |
Definition at line 64 of file probe_sim.cpp.
|
constexpr |
Definition at line 21 of file probe_sim.cpp.
Referenced by SetUnitConstants().
|
constexpr |
Definition at line 48 of file probe_sim.cpp.
|
constexpr |
Definition at line 42 of file probe_sim.cpp.
|
constexpr |
Definition at line 43 of file probe_sim.cpp.
|
constexpr |
Definition at line 47 of file probe_sim.cpp.
|
constexpr |
Definition at line 45 of file probe_sim.cpp.
|
constexpr |
Definition at line 37 of file probe_sim.cpp.
|
constexpr |
Definition at line 38 of file probe_sim.cpp.
|
constexpr |
Definition at line 39 of file probe_sim.cpp.
|
constexpr |
Definition at line 41 of file probe_sim.cpp.
|
constexpr |
Definition at line 32 of file probe_sim.cpp.
|
constexpr |
Definition at line 28 of file probe_sim.cpp.
|
constexpr |
Definition at line 35 of file probe_sim.cpp.
|
constexpr |
Definition at line 29 of file probe_sim.cpp.
|
constexpr |
Definition at line 30 of file probe_sim.cpp.
|
constexpr |
Definition at line 31 of file probe_sim.cpp.
|
constexpr |
Definition at line 33 of file probe_sim.cpp.
|
constexpr |
Definition at line 34 of file probe_sim.cpp.
|
constexpr |
Definition at line 40 of file probe_sim.cpp.
|
constexpr |
Definition at line 36 of file probe_sim.cpp.