Zero Hour engine — macOS (Apple Silicon) engine-v0.1.6
Native macOS arm64 build of the Command & Conquer: Generals — Zero Hour engine.
Fixed — menu/scene flicker (2560×1440 @ 60/120 fps)
Rare single-frame artifacts on the CWC shell-map menu (and any scene that re-uploads dynamic resources):
- Black rectangular tiles in the terrain (props still drawn on top).
- Torn "texture lines" where UVs overlaid incorrectly.
Both were CPU-vs-in-flight-GPU data races in the DX8→Metal shim, fixed with D3D-style resource rename (shim-only — no engine changes):
- Texture re-uploads no longer
replaceRegionin place while the previous frame's command buffer may still sample the texture. Each re-upload swaps in a fresh pooledMTLTexture; the old one serves in-flight frames and is recycled once the GPU finishes them. Free pool capped at 256/bucket. - Plain VB/IB
Lock(flags=0)(W3DWriteLockClass/AppendLockClasswhen re-filling static buffers, e.g. terrain tiles on camera move) no longer writes into the live sharedMTLBuffer. It renames to a pooled buffer and copies old contents, preserving read-modify-write without stalling.DISCARDorphaning andNOOVERWRITEbehavior unchanged.
No graphics / effects / quality removed — rendering output is identical; only the destination of CPU writes to reused resources changed. Verified frame-by-frame by the user: both artifact types gone.
Env switches: MTL_NO_TEX_RENAME=1 reverts texture rename (A/B); MTL_RENAME_LOG=1 logs rename counts + pool stats.
The GeneralsZH Launcher downloads this engine automatically. You must own a legitimate copy of Zero Hour — EA game data is not included. Apple Silicon (M-series) only. Checksums in SHA256SUMS.