Repository navigation
Optimizes ARM64 performance and refines build process - #2
Merged
Merged
Conversation
…ze diag Replace the per-frame GPU-completion busy-spin (std::this_thread::yield in a tight loop, polled by six waits per frame) with a bounded blocking wait on the rexglue CP-progress handshake (rex_ge_cp_wait_progress). The CP worker wakes us the instant it advances the ring; the ~80ms skip-bit stall fallback is kept as a safety net. Stops dozens of guest threads from starving the CP worker on low-core arm64 handhelds. Gate the always-on freeze watchdog (250ms poll, guest-thread stack walks, /dev/null page probing) and the per-present heartbeat behind a new debug cvar ge_freeze_diag (default OFF) so diagnostics don't run in shipping builds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Eliminates ~360 AddRectFilled calls/frame at 1080p (~720 at 4K) by building the scanline quad mesh once per unique (W, H, colour, atlas-UV) combination and submitting it via a single PrimReserve+memcpy each frame. Visual result is identical; CPU draw-list cost is now O(1) per frame. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…et to plain clang Split the README "Building from source" section into Linux/Windows/Android subsections with concrete prerequisites, commands, and output paths. Change the Linux CMake presets to invoke plain clang/clang++ instead of the pinned clang-20/clang++-20, matching CI and working on any recent LLVM (verified building with Clang 22). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The cached-mesh path uses ImGui::GetDrawListSharedData()->TexUvWhitePixel, but ImDrawListSharedData is only forward-declared in imgui.h; its complete definition (with TexUvWhitePixel) lives in imgui_internal.h. Without the include the file fails to compile (incomplete-type deref). Add it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…esktop Commit 90755ad replaced the per-frame GPU-completion busy-spin (std::this_thread::yield) with a bounded blocking wait on the rexglue CP-progress handshake (rex_ge_cp_wait_progress) to stop dozens of guest threads starving the CP worker on low-core arm64 handhelds. That change was not arch-gated, so it also altered the desktop path -- and regressed it: on x86-64 the build froze on the very first intro screen (render skipped every frame while the loop ran at ~60fps, GPU ring drained, skip-bit set). Bisect confirmed it: main (yield) boots splash -> gun-barrel -> menu; the blocking-wait commit freezes on the splash. The real variable is core count / oversubscription, which tracks the arm64-handheld target. So gate the wait: keep rex_ge_cp_wait_progress on __aarch64__, restore std::this_thread::yield() on desktop. cp_seq is now [[maybe_unused]] (only the arm64 path consumes it). Verified: linux-amd64 build now boots to the main menu, matching main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change significantly enhances performance for ARM64 architectures by optimizing GPU-completion waits and improves PostFX rendering performance. It also greatly refines the overall build experience through clearer documentation and more flexible CMake configurations.
Performance Improvements
ge_freeze_diagcvar to gate the CPU-intensive freeze watchdog and per-stall pipeline diagnostics. These features are now disabled by default in shipping builds, reducing overhead.Build and Documentation Enhancements
README.mdis now comprehensively restructured and expanded to provide clear, platform-specific build instructions for Linux, Windows, and Android, streamlining the self-build process.clangandclang++compiler names instead of versioned ones (e.g.,clang-20), simplifying toolchain setup requirements.imgui_internal.hto properly expose theImDrawListSharedDatatype, resolving a compilation issue related to ImGui usage.