mirror of
https://github.com/lutris/GlideVK.git
synced 2026-11-05 01:17:28 +00:00
[PR #3] fix(core): stabilize Glide2 rendering for Metal Fatigue #3
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lutris/GlideVK#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lutris/GlideVK/pull/3
Author: @adrianlungu
Created: 10/27/2026
Status: 🔄 Open
Base:
main← Head:metal-fatigue-glide-rendering📝 Commits (6)
032d1f5fix(core): stabilize Glide2 rendering for Metal Fatigue4493e17fix(glide2x): cover the monitor when Wine rejects a Glide mode217d554ci: build and publish i686 release DLLs7db0e81chore: commit the release dependency lockfiled98b21afix(core): satisfy current Clippy slice chunk lint9eaa019chore: satisfy current Clippy array chunk lints📊 Changes
14 files changed (+3211 additions, -506 deletions)
View changed files
➕
.cargo/config.toml(+2 -0)➕
.github/workflows/windows-dlls.yml(+111 -0)📝
.gitignore(+0 -1)➕
Cargo.lock(+55 -0)📝
README.md(+44 -0)📝
crates/glide2x/glide2x.def(+1 -0)📝
crates/glide2x/src/lib.rs(+769 -148)📝
crates/glide3x/src/lib.rs(+32 -7)📝
crates/glidevk-core/src/lib.rs(+25 -7)📝
crates/glidevk-core/src/texture.rs(+54 -16)➕
crates/glidevk-core/src/vk/frame_pacer.rs(+95 -0)📝
crates/glidevk-core/src/vk/mod.rs(+1504 -313)📝
crates/glidevk-core/src/win32.rs(+487 -6)📝
docs/game-compatibility.md(+32 -8)📄 Description
Summary
GLIDEVK_FPS) and lightweight profiling output for real-game stalls.grTexCalcMemRequiredusing the original SST-1 mip-size accounting: every LOD in the inclusive chain, narrow-level TMU granularity, and final 8-byte alignment.GLIDEVK_WINDOWED=0as explicitly disabled rather than treating any presence of the variable as windowed.Motivation
Metal Fatigue reached roughly 53 FPS at 1600x1200 with no Vulkan present failures or texture misses, then crashed abruptly in
GlideRendEng.dll. GlideVK previously reported only the base mip size. Metal Fatigue usesgrTexMinAddress,grTexMaxAddress, andgrTexCalcMemRequiredto lay out its own TMU heap, so base-only accounting can make consecutive textures overlap.The mip-size table and alignment behavior match the original 3Dfx SST-1 Glide source (
glide2x/sst1/glide/src/ditex.c).The same game also exposes a fullscreen fallback bug: it requests 1600x1200 with a NULL HWND, Wine/macOS returns
DISP_CHANGE_BADMODE(-2), and GlideVK previously left the game's initial 640x480 window untouched. That appears as a black square in the upper-left. The display-mode fallback now covers the game's monitor while retaining 1600x1200 as the logical Glide coordinate space.Validation
cargo fmt --allcargo test --workspace(run repeatedly; also verifies the context tests are no longer racy)cargo clippy --workspace --all-targets -- -D warningscargo +nightly build -Z build-std=std,panic_abort --release --target i686-pc-windows-gnuTests cover the monitor-preference bounds for the borderless fallback, including malformed monitor rectangles. The rebuilt PE32
glide2x.dllandglide3x.dllboth link successfully. Metal Fatigue still needs repeat runs to verify the corrected TMU layout and visual fullscreen behavior in the bottle.Release artifacts
The added Windows DLL workflow runs tests and Clippy, cross-builds
glide2x.dllandglide3x.dllfor i686 Windows, validates their PE architecture and key exports, publishes aglidevk-i686-windowsworkflow artifact on pushes/PRs, and attaches the DLLs plusSHA256SUMSto GitHub Releases forv*tags.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.