Skip to content

Commit 55f06b7

Browse files
committed
fix(sagepatch,macos): default DXVK_HUD off; MoltenVK can't compile DrawIndex
The wrapper scripts shipped DXVK_HUD=fps when SagePatch was active. On macOS 26 (MoltenVK 1.4.1, current SDK), DXVK's HUD pipeline shader uses gl_DrawID, which lowers to SPIR-V DrawIndex. SPIRV-Cross to MSL has no equivalent for that decoration and aborts conversion: [mvk-error] SPIR-V to MSL conversion error: DrawIndex is not supported in MSL. err: Failed to create swap chain blit pipeline: VK_ERROR_INITIALIZATION_FAILED The blit pipeline failure means DXVK can never present a frame; the game hangs at the EA Games logo (last thing the engine drew before DXVK started needing the blit pipeline). Revert the default to DXVK_HUD=0 on the three macOS wrapper scripts. Users who want the FPS overlay can still opt in with DXVK_HUD=fps. Linux and Flatpak wrappers are unchanged: native Vulkan drivers handle DrawIndex correctly there.
1 parent 1cf944f commit 55f06b7

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

scripts/build/macos/bundle-macos-generals.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,8 @@ fi
372372
# GeneralsX @bugfix fbraz3 20/03/2026 DXVK requires this env var on non-Win32; SDL3 matches game windowing layer
373373
export DXVK_WSI_DRIVER="SDL3"
374374
375-
if [[ -f "${LIB_DIR}/libsage_patch.dylib" && "${SAGE_PATCH_DISABLED:-0}" != "1" ]]; then
376-
export DXVK_HUD="${DXVK_HUD:-fps}"
377-
fi
375+
# DXVK HUD: kept opt-in. MoltenVK on macOS 26 can't compile DXVK's HUD shader.
376+
export DXVK_HUD="${DXVK_HUD:-0}"
378377
379378
if [[ -f "${RESOURCES_DIR}/MoltenVK_icd.json" ]]; then
380379
export VK_ICD_FILENAMES="${RESOURCES_DIR}/MoltenVK_icd.json"

scripts/build/macos/bundle-macos-zh.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,11 @@ fi
393393
# GeneralsX @bugfix fbraz3 20/03/2026 DXVK requires this env var on non-Win32; SDL3 matches game windowing layer
394394
export DXVK_WSI_DRIVER="SDL3"
395395
396-
# DXVK HUD: when SagePatch is bundled and active, default to "fps" so casual
397-
# users see a frame counter without extra config. Set DXVK_HUD=0 to disable.
398-
if [[ -f "${LIB_DIR}/libsage_patch.dylib" && "${SAGE_PATCH_DISABLED:-0}" != "1" ]]; then
399-
export DXVK_HUD="${DXVK_HUD:-fps}"
400-
fi
396+
# DXVK HUD: kept opt-in. MoltenVK on macOS 26 cannot compile DXVK's HUD
397+
# pipeline shader (gl_DrawID / SPIR-V DrawIndex has no MSL equivalent yet).
398+
# Defaulting it on causes the swap chain blit pipeline to fail. Users wanting
399+
# an FPS overlay set DXVK_HUD=fps themselves.
400+
export DXVK_HUD="${DXVK_HUD:-0}"
401401
402402
if [[ -f "${RESOURCES_DIR}/MoltenVK_icd.json" ]]; then
403403
export VK_ICD_FILENAMES="${RESOURCES_DIR}/MoltenVK_icd.json"

scripts/build/macos/deploy-macos-zh.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,11 @@ fi
196196
# GeneralsX @bugfix fbraz3 20/03/2026 DXVK requires DXVK_WSI_DRIVER on non-Win32; must match game windowing (SDL3)
197197
export DXVK_WSI_DRIVER="SDL3"
198198
199-
# DXVK HUD: SagePatch builds default to "fps" so casual users see frame rate
200-
# without extra config. Set DXVK_HUD=0 explicitly to disable, or anything else
201-
# (e.g. fps,memory,version) to customize.
202-
if [[ -f "\${SCRIPT_DIR}/libsage_patch.dylib" && "\${SAGE_PATCH_DISABLED:-0}" != "1" ]]; then
203-
export DXVK_HUD="\${DXVK_HUD:-fps}"
204-
fi
199+
# DXVK HUD: kept opt-in. MoltenVK on macOS 26 cannot compile DXVK's HUD
200+
# pipeline shader (uses gl_DrawID / SPIR-V DrawIndex which has no MSL
201+
# equivalent yet), so defaulting it on breaks the swap chain blit pipeline.
202+
# Users wanting an FPS overlay set DXVK_HUD=fps themselves.
203+
export DXVK_HUD="\${DXVK_HUD:-0}"
205204
206205
# MoltenVK ICD manifest — deployed alongside the binary by deploy-macos-zh.sh
207206
if [[ -f "\${SCRIPT_DIR}/MoltenVK_icd.json" ]]; then

0 commit comments

Comments
 (0)