SDL3 Migration - #572
Conversation
## [1.1.4](v1.1.3...v1.1.4) (2026-08-27) ### Bug Fixes * **d3d12:** read skinned bones from raw buffer ([07d0595](07d0595)) * **dotnet:** defer managed symbol resolution ([8167839](8167839))
|
just FYI, the build now works, everything renders and the pipelines pass https://github.com/yesid-bocanegra/MuMain/actions/runs/33085798738 |
Preserve translated NPC names and selected-monster health bars across platforms. Scale text, panels, scene viewports, overlays, and picked-item cursor coordinates consistently.
Archive POSIX runtimes on source runners to preserve executable bits. Link each client release to its exact content-addressed data bundle.
A four-entry statue array used the six-entry gate count, overwriting adjacent globals after the UI state changed binary layout.
|
Pulled this branch today and tried a native Windows MSVC build ( 1. Windows configure fails out of the box —
Following those docs exactly, $env:VCPKG_ROOT = "<path-to-vcpkg>"
cmake --preset windows-x64 `
"-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
"-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=<repo>/toolchain-x64.cmake" `
"-DVCPKG_TARGET_TRIPLET=x64-windows-static-md"Suggest documenting this as a required prerequisite, or baking the chain-load into 2.
if (MSVC)
# ponytail: native CI uses dynamic vcpkg triplets; guard an empty runtime
# DLL list if static triplets are added.
add_custom_command(TARGET Main POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
$<TARGET_RUNTIME_DLLS:Main>
"$<TARGET_FILE_DIR:Main>"
COMMAND_EXPAND_LISTS
COMMENT "Staging linked-target runtime DLLs"
VERBATIM
)
endif()The comment names the exact risk but the guard was never written. With COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<BOOL:$<TARGET_RUNTIME_DLLS:Main>>,copy_if_different,true>"
$<TARGET_RUNTIME_DLLS:Main>
"$<TARGET_FILE_DIR:Main>"3. Widespread invalid-UTF-8 bytes across many headers MSVC's D3D12 runtime: works cleanly once 1 and 2 are fixed With Process stays responsive, window opens, and there are zero rendering/GPU errors in the log afterward. 4. Not sure if expected - flagging in case it's not already known. The code path: 5. Could you re-run preservation-first conflict resolution against current
(co-written by Claude) |
|
I tried testing it on my machine (Windows 11, Ryzen 5700X3D, AMD 5700XT):
Dug into why the debug build is slow even in vulkan (via Claude), and it's explainable from the implementation alone, not really a bug. ================ Details**The old GL/RHI renderer and this one aren't structurally comparable in Debug.** `RHI_GL.cpp` was a thin, mostly-direct wrapper: a draw call went through a small state-cache check and straight into a GL call. `MuRendererSDLGpu.cpp` does something different by design — it **records** every draw into a per-frame `std::vector s_renderCmds`, classifies whether each command can merge with the previous one, and only actually submits to the GPU in `EndFrame()`'s replay pass. That's intentional, not accidental — it's what makes cross-call batching (the SDL GPU equivalent of the old GLP-19 work) possible at all.The catch is what's being pushed into that vector, every single draw call: struct RenderCmd
{
RenderCmdType type;
SDL_GPUGraphicsPipeline* pipeline;
SDL_GPUTexture* texture;
SDL_GPUSampler* sampler;
Uint32 vtxOffset, vtxCount, idxCount, stripIdxOffset;
VertexUniforms vu;
SkinningVertexUniforms skinningVu{}; // 192 bytes
FogUniform fogUniform; // 48 bytes
SDL_GPUViewport viewport;
SDL_Rect scissor;
BlendMode blendMode{};
bool blendEnabled{}, depthTestEnabled{}, depthMaskEnabled{}, cullFaceEnabled{};
};300+ bytes, value-copied into The asymmetry that makes this specifically worse than the old renderer's own Debug penalty: Debug flags only punish our compiled code, never the driver's — the old renderer put more of its per-frame cost into driver-side calls (already-optimized, unaffected by our build config). This renderer deliberately moved more work into application-owned C++ specifically so it could cut redundant GPU-side calls in Release. Good trade once optimized; in Debug it means a larger fraction of total frame cost now runs at Debug speed instead of driver speed. And it scales with scene complexity — more draws means more pushes/comparisons/replay, all at Debug speed, which lines up with a frame-rate problem rather than a flat offset. Not proposing a fix — the batching architecture is the right call for Release, and trimming ================ Add'l request:
|
|
thanks for testing this so thoroughly, I'll try to address these issues tomorrow or monday. I also made some changes that surfaced from patching a rendering issue for monster and npc names which led to reviewing the UI and font scaling. |
## [1.2.0](v1.1.5...v1.2.0) (2026-08-30) ### Features * **ui:** add responsive HUD layouts ([fe407e1](fe407e1)) ### Bug Fixes * **ui:** align scaled item interactions ([2bdd366](2bdd366)) * **ui:** block world hover behind panels ([1e0099b](1e0099b)) * **ui:** scale auxiliary game windows ([a1ef8f8](a1ef8f8)) * **ui:** stabilize character and NPC labels ([307a4a2](307a4a2))
…ion/upstream-2026-08-30 # Conflicts: # docs/GPU Skinning/README.md # src/source/Data/GameConfig/GameConfigConstants.h # src/source/Render/Core/RenderConfig.cpp # src/source/Render/Core/RenderConfig.h # src/source/Render/Effects/ZzzEffectParticle.cpp # src/source/Render/RHI/RHI_GL.cpp # src/source/Render/Terrain/ZzzLodTerrain.cpp # tests/CMakeLists.txt
## [1.2.1](v1.2.0...v1.2.1) (2026-08-30) ### Performance * **render:** group particle draws by texture behind [Render] SortParticleDraws ([dccda7f](dccda7f)) * **render:** upload only changed terrain light rows, not the whole array ([58742b8](58742b8)) ### Refactoring * **render:** extract RenderParticle from RenderParticles' loop body ([0f243f8](0f243f8))
|
Review feedback update:
Verification:
Caveat: Windows/D3D12 hardware runtime behavior was not manually exercised; runtime retesting remains required. Deferred item 3 needs a dedicated immediate follow-up: safe frame-boundary VSync changes, MAILBOX then IMMEDIATE fallback, D3D12 software pacing, |

Summary
Migrates the MuMain client toward a cross-platform SDL3 runtime while preserving existing Windows behavior and upstream gameplay changes.
The migration makes SDL3 and SDL GPU the primary platform/rendering path, replaces legacy audio with miniaudio, expands Linux/macOS support, strengthens the network bridge, and adds
broad regression coverage.
Key changes
.ideaand.superpowers.Review scope
This is intentionally a repository-scale migration:
A large portion of the added lines comes from vendored miniaudio sources and generated shader artifacts.
Recommended review order:
Detailed source-to-target accounting is available in:
docs/porting/cross-platform-sdl-ledger.mddocs/porting/upstream-sync-2026-08-20-ledger.mddocs/upstream-merge-features.mddocs/sdl-migration-runtime-checklist.mdValidation recorded
Validation still required
Known gaps
Related work
Upstream capabilities and source PRs are mapped individually in the preservation and feature ledgers listed above.