Sync master with upstream (2026-09-12) - #7
Merged
Merged
Conversation
lukka/run-vcpkg does a bit too much these days and as GHA caching is no longer available on GitHub, we instead leverage actions/cache with our own location set in an environment variable. run-vcpkg clobbers this variable with a normalised location which leads to mismatches in the restore and store steps.
Bumped vendored dependency versions by about three years: * Dear ImGui to 1.92.9b from 1.89.9. * GLM to 1.0.3 from 0.9.9.8. * GLI to 2026-04-05 master with patches for GLM. * luautf8 to 0.1.7 from 0.1.5. * vcpkg to 2026.03.18 from 2026.01.16. luautf8 has 0.2.0 available but that has breaking changes that may affect the Lua code.
zlib recently changed the name of their DLLs on Windows to `z.dll` and `z.dll`, adapt build scripts accordingly.
ci: cache vcpkg packages, update actions, update dependencies, use VS 2026
We always resolve the command buffer hash before drawing any layers so there is no need for mid-draw bail logic. Replaced MurmurHash64A with xxHash's way faster XXH3 for command buffer hashing. Only consider textures used for layer geometry when determining frame completeness for elision. Command buffer command structs are now packed on 1-byte alignment and the command key has shrunk from int to u8. Getting rid of padding isn't crucial as subsequent identical frames should both touch the padding bytes in similar ways, but it's nice.
By moving the hardcoded shader sources to standalone files that can be included at build time, we can get a better editing experience with language servers in external editors. This without having to ship loose shader files with the runtime as they're embedded at build time with CMakeRC.
The blend mode and mask index have been removed from the runtime and Lua API, and the shader now perform a much cheaper mapping from virtual to NDC coordinates; inspired by rusty-path-of-building. The blend mode has been modifiable via calls from Lua since the beginning but has in modern time not been set to anything but regular alpha blending. Draw calls have been able to pass a mask layer as an optional parameter, intended for blending out regions of the color texture that the app did not want to display, like only drawing the immediate areas around line connectors with the new style of nested connector textures. ANGLE shaders performed a full 4x4 matrix transformation of positions with a model-view-projection matrix, making it capable of performing arbitrary transforms of geometry. This was costly in terms of both uniform buffers but also added shader complexity and ALU cost. It also did not play nice with CPU draw call culling.
…formance feat: accurate frame elision and draw performance
…6-09-12 # Conflicts: # CMakeLists.txt # libs/luautf8 # vcpkg.json
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.
Merge 11 upstream commits (
6be052c..fe7851e): draw-performance work (frame elision, shader sources moved to build-embedded files via CMakeRC, BlendMode/mask-index removal, GLSL optimisation), dependency bumps, and CI changes (vs2026, manual vcpkg bootstrap, binary cache).Conflicts and how they were resolved
libs/luautf8(submodule) — took upstream's pin. Upstream movesbdd3d7f→d65ebfa. The fork's pin was1bb70d4("Explicitly include limits.h"), landed bye212cd9to get a commit reachable from the submodule's own remote.d65ebfais a strict descendant of1bb70d4and is reachable fromorigin/masterin the submodule, so it carries the include fix and satisfies the reachability requirement. The fork no longer needs its own pin.vcpkg.json— kept both sides. Upstream addscmakerc(andglm/xxhash); the fork'sangle+features: [metal]+platform: osxblock is retained unchanged.CMakeLists.txt— took upstream's side for the one conflicted hunk. Fork commitb4958a2had changed the non-Windowselse()branch fromset(SIMPLEGRAPHIC_PLATFORM_SOURCES …)tolist(APPEND …), because thesetoverwrote thesys_macos.mmentry added by theif (APPLE)block. Upstream has since restructured:add_librarynow runs before the platform blocks and each branch callstarget_sources(SimpleGraphic PRIVATE …)directly, so nothing overwrites anything and the bug is gone. Upstream's form is correct and subsumes the fix.The rest of
b4958a2is still required and survived the merge intact:$<$<PLATFORM_ID:Windows>:LUA_BUILD_AS_DLL>, theusocket.c/wsocket.cgenerator expression, and the Windows-gatedwsock32/ws2_32link libs.macOS port verification
engine/render/r_main.cppauto-merged despite upstream's7f936d7frame-pacing rewrite touching the same region. The fork'sstd::this_thread::sleep_for(2cca261) is present, and no Win32Sleep()was reintroduced into the frame loop — the remainingSleep(references inengine/are the cross-platformsys_main_c::Sleepmethod and pre-existingmemtrak3.cppcode, neither touched by this merge.Every other fork-only commit's added lines were checked line-by-line against the post-merge tree and are present:
6b4cf07find_c directory-entry fix,5d5679dLuaJIT2026-07-20_1port fixes,759892dlauncher,b0db3cctexture transcode,aedfd7eIndexUTF8ToUTF32,7893a27base64 includes,5bb13e1FindLuaJIT macOS lib names,e528bb9LuaJIT port fixes,810cc19Cmd→CTRL,e20e15fANGLE Metal backend, plus the README macOS section.P5 (re-versioned vendored dir): upstream added only
vcpkg-ports/ports/gli/2026-09-09/, which the fork has never patched. No newluajitport directory; the live baseline is still2026-07-20_1, the one the fork patches. No forward-port needed.Not verified by CI
Windows
build_dllcannot exercise the macOS-only patches — the_lua_getenvcopy/_lua_getenvfreemacros live in the non-Windows branch ofpob-wide-crt.patch, andINSTALL_TSYMNAMEplus theconfigureexec bit are osx-triplet-only. The real gate is the local arm64 macOS rebuild and runtime smoke test, run separately.