[BUNDLE] Four fixes carried from Peppacodes' fork: #762 #764 #765 #832 #1603

Closed
github-bot wants to merge 9 commits from gh-pr/1603/head into gh-pr/1603/base
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 19:42 UTC · original
MamaLeVrai:bundle/carried-peppacodes → main · +204 −11 · 7 files · 9 commits · closed without merging

Four small fixes from one contributor's fork, in one PR. Each was reported as an issue with a branch, a commit, a repro and a test, written when pull requests were still limited to collaborators, and none has a pull request. The branches are merged here as they are, with their commits and their author, onto main (ffe310e); nothing is changed.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR. The re-verification commands are below.

What is inside

Issue Fork branch Commit(s) What it fixes
#762 Peppacodes/VIctory:fix/title-dll-name-case 1e24f34, 22c3d00 a title DLL in a case-sensitive folder (WSL makes them) is found by any spelling, and a folder spelled like it does not hide it
#764 Peppacodes/VIctory:fix/getprocaddress-last-error d0662f4 GetProcAddress on our pseudo modules sets ERROR_PROC_NOT_FOUND on a miss, as the host's does
#765 Peppacodes/VIctory:fix/oem-key-empty-subkey 8e9f9b3 RegOpenKeyW / RegOpenKeyExW with a null or empty subkey under our OEM key open the key itself
#832 Peppacodes/VIctory:fix/fcmp-false-true e04929d v_cmp_f_* and v_cmp_tru_* on floats lower as constants, not fcmp false / fcmp true, which remove the WARP device

Every one has its own test (the two loader tests skip where Windows cannot make a case-sensitive folder). The reasoning of each is in its issue.

Notes

  • #832 and #1262. My double-precision PR #1262 has a special case for v_cmp_f_f64 and v_cmp_tru_f64 that does what #832 does for every float width, so the two overlap in the same arm of the compare lowering and conflict textually; if both land, #832's if op == "f" || op == "tru" is the one to keep.
  • Authorship. The commits are Peppacodes' own, not rewritten. If they would rather open these as their own pull requests, this one can be closed.

Verification

Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 347 passed, 0 failed, 6 ignored (main: 342 passed, 6 ignored)

The title was not run. No game data is used or committed.

Re-verify in one go

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/carried-peppacodes
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

**@⁠MamaLeVrai** on GitHub · 2026-11-24 19:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/1603) `MamaLeVrai:bundle/carried-peppacodes` → `main` · +204 −11 · 7 files · 9 commits · closed without merging **Four small fixes from one contributor's fork, in one PR.** Each was reported as an issue with a branch, a commit, a repro and a test, written when pull requests were still limited to collaborators, and none has a pull request. The branches are merged here as they are, with their commits and their author, onto `main` (`ffe310e`); nothing is changed. > For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a `[BUNDLE]` PR. The re-verification commands are below. ## What is inside | Issue | Fork branch | Commit(s) | What it fixes | |---|---|---|---| | #762 | `Peppacodes/VIctory:fix/title-dll-name-case` | `1e24f34`, `22c3d00` | a title DLL in a case-sensitive folder (WSL makes them) is found by any spelling, and a folder spelled like it does not hide it | | #764 | `Peppacodes/VIctory:fix/getprocaddress-last-error` | `d0662f4` | `GetProcAddress` on our pseudo modules sets `ERROR_PROC_NOT_FOUND` on a miss, as the host's does | | #765 | `Peppacodes/VIctory:fix/oem-key-empty-subkey` | `8e9f9b3` | `RegOpenKeyW` / `RegOpenKeyExW` with a null or empty subkey under our OEM key open the key itself | | #832 | `Peppacodes/VIctory:fix/fcmp-false-true` | `e04929d` | `v_cmp_f_*` and `v_cmp_tru_*` on floats lower as constants, not `fcmp false` / `fcmp true`, which remove the WARP device | Every one has its own test (the two loader tests skip where Windows cannot make a case-sensitive folder). The reasoning of each is in its issue. ## Notes - **#832 and #1262.** My double-precision PR #1262 has a special case for `v_cmp_f_f64` and `v_cmp_tru_f64` that does what #832 does for every float width, so the two overlap in the same arm of the compare lowering and conflict textually; if both land, #832's `if op == "f" || op == "tru"` is the one to keep. - **Authorship.** The commits are Peppacodes' own, not rewritten. If they would rather open these as their own pull requests, this one can be closed. ## Verification Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain): | Check | Result | |---|---| | `cargo clippy --workspace --all-targets --locked -- -D warnings` | clean | | `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` | clean | | `cargo test --workspace --locked` | 347 passed, 0 failed, 6 ignored (`main`: 342 passed, 6 ignored) | The title was not run. No game data is used or committed. ## Re-verify in one go ```powershell git fetch https://github.com/MamaLeVrai/VIctory.git bundle/carried-peppacodes git checkout FETCH_HEAD cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo test --workspace --locked ``` AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
map_dll lowercased the DLL's name and joined that to the title folder.
On a case-sensitive folder (WSL creates them so, and new subfolders
inherit the flag) GameLib.dll is not gamelib.dll: is_file() was false
and the DLL was skipped without an error, so its imports went to stubs
and a title's own LoadLibrary saw "not a title image".

The lowercased name stays the key (seen, wanted, the returned list).
The file is the name as written or, failing that, the folder's entry
that matches it ignoring ASCII case, as the Windows loader ignores case.

Test: a case-sensitive temp folder (fsutil setCaseSensitiveInfo, no
admin) holding Late.dll, loaded as Late.dll, LATE.DLL and late.dll.
Skipped where Windows cannot make such a folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
GetProcAddress on one of our pseudo modules returned NULL for a name it
does not export, or for any ordinal, without setting the last error. The
host sets ERROR_PROC_NOT_FOUND (127), and a caller that builds its
failure from GetLastError() got 0, HRESULT_FROM_WIN32(0) being S_OK.

Test: a missing name on kernel32 (the host's, for comparison), and a
missing name and an ordinal on xgameruntime.dll, each after clearing
the last error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
RegOpenKeyW and RegOpenKeyExW returned ERROR_FILE_NOT_FOUND for any
path below our stand-in for HKLM\...\CurrentVersion\OEM, including a
null or empty one. The documented behaviour, and the host's: RegOpenKeyW
gives back the key it was passed, RegOpenKeyExW a handle to the same
key. Other paths below it still are not found (it has no subkeys).

Test: both functions with a null and an empty subkey, on our key and on
a host key for comparison.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The case-ignoring fallback took the folder's first entry that matched the
name and only then checked it was a file. A folder listed before the file
(NTFS lists LATE.DLL before late.dll) made the DLL not found. It now
takes the first matching entry that is a file.

Found by MichaelSmithAI in Wine on ext4; the same happens on a
case-sensitive NTFS folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
v_cmp_f_{f32,f16} and v_cmp_tru_{f32,f16} lowered to fcmp false and
fcmp true (predicates 0 and 15). DXC folds those away, so drivers never
see them from it, and WARP removes its device at the first dispatch of
a pipeline that has one ("The GPU device instance has been suspended").
The hardware adapter (RTX 5080) runs them. A removed WARP device stays
removed for the process, so everything after it fails too.

They are false and true whatever the operands, NaNs included (RDNA2
ISA), so they now lower as constants, as the integer v_cmp_f/v_cmp_t
already do. FALSE and TRUE stay in the predicate table, unused.

Found with a sweep of every 32-bit VALU instruction on the hardware
adapter against WARP: all 62 compares now run and agree on both.

Test: float_compares_that_are_always_false_or_true, f32 and f16 with
ordinary and NaN operands, on the hardware adapter and WARP. On main
WARP's dispatch fails with the device suspended.
Merges the branches fix/title-dll-name-case, fix/getprocaddress-last-error,
fix/oem-key-empty-subkey and fix/fcmp-false-true of Peppacodes/VIctory onto
main (ffe310e), each with its commits and its author unchanged, no
conflicts and no changes of mine. cargo clippy --workspace --all-targets
--locked -- -D warnings, with and without --all-features, is clean and
cargo test --workspace --locked passes (347 passed, 6 ignored; main has
342 passed, 6 ignored).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:02 +00:00
github-bot closed this pull request 2026-11-26 04:38:02 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:21 UTC · original

Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged.

See #1434.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 01:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/1603#issuecomment-7149465029) Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged. See #1434. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:31 UTC · original

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-hle/src/modules/kernel.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1603#issuecomment-7149653144) <!-- victory-triage v1 head=9ec15138f66ed9be9dcca4e39d5ca5a51512e61b verdict=needs-rebase at=2026-11-25T01:31:55Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-hle/src/modules/kernel.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1603
No description provided.