|
Bicameral Engine
GPU-resident engine for a magic-research open-world game
|
Classes | |
| struct | FrameSlot |
| struct | SimSubmission |
| struct | CompletedExtraction |
| struct | PendingClick |
| struct | Stats |
| struct | FrameLoopParts |
| class | FrameLoop |
Typedefs | |
| using | Clock = chr::steady_clock |
Functions | |
| editor::TimeRequest | AutoTimeRequest (uint64_t frame) |
| double | Milliseconds (Clock::duration duration) |
| double | TimestampMilliseconds (uint64_t ticks, uint64_t frequency) |
| double | TimestampMilliseconds (uint64_t begin, uint64_t end, uint64_t frequency) |
| std::expected< std::unique_ptr< Window >, std::string > | CreateWindowForLoop () |
| gpu::DeviceOptions | LoopDeviceOptions (const FrameLoopOptions &options) |
| std::expected< sim::ProbeSim, std::string > | CreateSimulation (ID3D12Device5 *device, const FrameLoopOptions &options, const sim::BakedReactionTable &reactionTable) |
| std::expected< std::shared_ptr< const script::LoadedReactionTable >, std::string > | LoadWorldReactionTable (const FrameLoopOptions &options) |
| std::expected< FrameLoopParts, std::string > | CreateParts (const FrameLoopOptions &options) |
| void | PushFromCommand (sim::PhysicsWorld &world, const sim::ProbeCommand &command) |
Variables | |
| constexpr uint32_t | FRAME_SLOT_COUNT = gpu::SwapChain::BUFFER_COUNT |
| constexpr uint32_t | SIM_SLOT_COUNT = sim::ProbeSim::FRAME_SLOT_COUNT |
| constexpr uint32_t | INITIAL_CLIENT_WIDTH = 1280 |
| constexpr uint32_t | INITIAL_CLIENT_HEIGHT = 720 |
| constexpr uint32_t | FRAME_WAIT_TIMEOUT_MS = 100 |
| constexpr uint32_t | CONSTANTS_BYTES = 256 |
| constexpr uint32_t | TIMESTAMPS_PER_FRAME = 2 |
| constexpr uint32_t | AUTO_CLICK_INTERVAL_FRAMES = 20 |
| constexpr auto | STATS_INTERVAL = chr::seconds(1) |
| constexpr auto | MINIMIZED_SLEEP = chr::milliseconds(16) |
| constexpr uint64_t | TRACE_KEY_TICKS = 60 |
| constexpr uint32_t | TRACE_KEY_RADIUS_CELLS = 8 |
| constexpr uint64_t | AUTO_TRACE_FRAME = 30 |
| constexpr uint64_t | AUTO_PUSH_FRAME = 60 |
| constexpr uint64_t | AUTO_TIME_PAUSE_FRAME = 20 |
| constexpr uint64_t | AUTO_TIME_HOLD_FRAME = 36 |
| constexpr uint64_t | AUTO_TIME_HOLD_CHECK_FRAME = 44 |
| constexpr std::array< uint64_t, 3 > | AUTO_TIME_STEP_FRAMES = {45, 50, 55} |
| constexpr uint64_t | AUTO_TIME_STEP_CHECK_FRAME = 64 |
| constexpr uint64_t | AUTO_TIME_FASTER_FRAME = 65 |
| constexpr uint64_t | AUTO_TIME_RESUME_FRAME = 70 |
| constexpr uint64_t | AUTO_TIME_SLOWER_FRAME = 100 |
| constexpr uint64_t | AUTO_TIME_NORMAL_FRAME = 130 |
| constexpr uint32_t | PUSH_IMPULSE_MILLINEWTON_SECONDS = 5'000'000 |
| using bicameral::frame::anonymous_namespace{frame_loop.cpp}::Clock = chr::steady_clock |
Definition at line 52 of file frame_loop.cpp.
| editor::TimeRequest bicameral::frame::anonymous_namespace{frame_loop.cpp}::AutoTimeRequest | ( | uint64_t | frame | ) |
Definition at line 82 of file frame_loop.cpp.
References AUTO_TIME_FASTER_FRAME, AUTO_TIME_NORMAL_FRAME, AUTO_TIME_PAUSE_FRAME, AUTO_TIME_RESUME_FRAME, AUTO_TIME_SLOWER_FRAME, AUTO_TIME_STEP_FRAMES, and AutoTimeRequest().
Referenced by AutoTimeRequest(), and bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::BuildEditor().
| std::expected< FrameLoopParts, std::string > bicameral::frame::anonymous_namespace{frame_loop.cpp}::CreateParts | ( | const FrameLoopOptions & | options | ) |
Definition at line 457 of file frame_loop.cpp.
References bicameral::frame::FrameLoopOptions::adapter, bicameral::gpu::Device::Create(), bicameral::gpu::Queue::Create(), bicameral::gpu::SwapChain::Create(), bicameral::render::ProbeView::Create(), bicameral::sim::ProbePeek::Create(), CreateParts(), CreateSimulation(), CreateWindowForLoop(), bicameral::gpu::SwapChain::FORMAT, bicameral::save::ReplayPlayer::Load(), LoadWorldReactionTable(), LoopDeviceOptions(), bicameral::frame::FrameLoopOptions::maxFrameLatency, bicameral::gpu::DeviceOptions::presentMonitor, bicameral::frame::FrameLoopOptions::renderHighPriority, and bicameral::frame::FrameLoopOptions::replayPath.
Referenced by CreateParts().
| std::expected< sim::ProbeSim, std::string > bicameral::frame::anonymous_namespace{frame_loop.cpp}::CreateSimulation | ( | ID3D12Device5 * | device, |
| const FrameLoopOptions & | options, | ||
| const sim::BakedReactionTable & | reactionTable ) |
Definition at line 413 of file frame_loop.cpp.
References bicameral::sim::ProbeSim::Create(), CreateSimulation(), bicameral::sim::MakeProbeStackScene(), bicameral::frame::FrameLoopOptions::physics, bicameral::frame::FrameLoopOptions::physicsComputeBroadphase, bicameral::frame::FrameLoopOptions::simLoad, bicameral::frame::FrameLoopOptions::simSplit, bicameral::frame::FrameLoopOptions::trace, and bicameral::frame::TRACE_CAPACITY_PER_FRAME.
Referenced by CreateParts(), and CreateSimulation().
| std::expected< std::unique_ptr< Window >, std::string > bicameral::frame::anonymous_namespace{frame_loop.cpp}::CreateWindowForLoop | ( | ) |
Definition at line 389 of file frame_loop.cpp.
References bicameral::Window::Create(), CreateWindowForLoop(), INITIAL_CLIENT_HEIGHT, and INITIAL_CLIENT_WIDTH.
Referenced by CreateParts(), and CreateWindowForLoop().
| std::expected< std::shared_ptr< const script::LoadedReactionTable >, std::string > bicameral::frame::anonymous_namespace{frame_loop.cpp}::LoadWorldReactionTable | ( | const FrameLoopOptions & | options | ) |
Definition at line 430 of file frame_loop.cpp.
References bicameral::Info, bicameral::script::LoadReactionTable(), LoadWorldReactionTable(), bicameral::Log(), bicameral::script::PackageRejection::package, bicameral::frame::FrameLoopOptions::packageRoot, bicameral::script::PackageRejection::reason, bicameral::Sim, and bicameral::Warning.
Referenced by CreateParts(), and LoadWorldReactionTable().
| gpu::DeviceOptions bicameral::frame::anonymous_namespace{frame_loop.cpp}::LoopDeviceOptions | ( | const FrameLoopOptions & | options | ) |
Definition at line 402 of file frame_loop.cpp.
References bicameral::gpu::DefaultDeviceOptions(), bicameral::Gpu, bicameral::gpu::DeviceOptions::gpuBasedValidation, bicameral::Info, bicameral::Log(), LoopDeviceOptions(), and bicameral::frame::FrameLoopOptions::physics.
Referenced by CreateParts(), and LoopDeviceOptions().
| double bicameral::frame::anonymous_namespace{frame_loop.cpp}::Milliseconds | ( | Clock::duration | duration | ) |
Definition at line 104 of file frame_loop.cpp.
References Milliseconds().
Referenced by Milliseconds(), bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::ReportEvents(), and bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::RunFrame().
| void bicameral::frame::anonymous_namespace{frame_loop.cpp}::PushFromCommand | ( | sim::PhysicsWorld & | world, |
| const sim::ProbeCommand & | command ) |
Definition at line 661 of file frame_loop.cpp.
References bicameral::sim::Command::payload, bicameral::sim::PhysicsWorld::Push(), and PushFromCommand().
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CheckPhysics(), and PushFromCommand().
| double bicameral::frame::anonymous_namespace{frame_loop.cpp}::TimestampMilliseconds | ( | uint64_t | begin, |
| uint64_t | end, | ||
| uint64_t | frequency ) |
Definition at line 114 of file frame_loop.cpp.
References TimestampMilliseconds().
| double bicameral::frame::anonymous_namespace{frame_loop.cpp}::TimestampMilliseconds | ( | uint64_t | ticks, |
| uint64_t | frequency ) |
Definition at line 108 of file frame_loop.cpp.
References TimestampMilliseconds().
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CollectFrameSlot(), bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::ReportSimReadback(), TimestampMilliseconds(), and TimestampMilliseconds().
|
constexpr |
Definition at line 61 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::QueueClicks().
|
constexpr |
Definition at line 69 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::QueuePushes().
|
constexpr |
Definition at line 77 of file frame_loop.cpp.
Referenced by AutoTimeRequest().
|
constexpr |
Definition at line 74 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CheckAutoTime().
|
constexpr |
Definition at line 73 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CheckAutoTime().
|
constexpr |
Definition at line 80 of file frame_loop.cpp.
Referenced by AutoTimeRequest().
|
constexpr |
Definition at line 72 of file frame_loop.cpp.
Referenced by AutoTimeRequest().
|
constexpr |
Definition at line 78 of file frame_loop.cpp.
Referenced by AutoTimeRequest().
|
constexpr |
Definition at line 79 of file frame_loop.cpp.
Referenced by AutoTimeRequest().
|
constexpr |
Definition at line 76 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CheckAutoTime().
|
constexpr |
Definition at line 75 of file frame_loop.cpp.
Referenced by AutoTimeRequest(), and bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CheckAutoTime().
|
constexpr |
Definition at line 68 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::QueueClicks().
|
constexpr |
Definition at line 59 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CreateFrameSlots().
|
constexpr |
Definition at line 54 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CollectFrameSlot(), bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CreateEditor(), bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CreateFrameSlots(), bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::HandleResize(), and bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::RecordRenderLists().
|
constexpr |
Definition at line 58 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::Run().
|
constexpr |
Definition at line 57 of file frame_loop.cpp.
Referenced by CreateWindowForLoop().
|
constexpr |
Definition at line 56 of file frame_loop.cpp.
Referenced by CreateWindowForLoop().
|
constexpr |
Definition at line 63 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::Run().
|
constexpr |
Definition at line 102 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::QueuePushes().
|
constexpr |
Definition at line 55 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CollectSimSubmissions(), and bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::SubmitSim().
|
constexpr |
Definition at line 62 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::Run().
|
constexpr |
Definition at line 60 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CollectFrameSlot(), bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::CreateFrameSlots(), and bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::RecordRenderLists().
|
constexpr |
Definition at line 67 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::StartRequestedTrace().
|
constexpr |
Definition at line 66 of file frame_loop.cpp.
Referenced by bicameral::frame::anonymous_namespace{frame_loop.cpp}::FrameLoop::StartRequestedTrace().