fix(hle/kernel): apply title priority cap when restoring startup priority raises (#282) #377

Manually merged
github merged 1 commit from github-bot/gh-377 into gh-pr/377/base 2026-12-03 08:03:16 +00:00 AGit
Owner

@⁠RUIZ-Enrique-25002136 on GitHub · 2026-12-03 07:52 UTC · original
RUIZ-Enrique-25002136:fix/kernel-startup-priority-cap → main · +25 −1 · 1 files · 1 commits · merged 2026-12-03 08:02 UTC

Summary

Applies the post-window cap = true rule and VICTORY_TITLE_PRIORITY_MAX cap (held_at) when give_back_startup_raises() restores thread priorities at the end of a VICTORY_STARTUP_PRIORITIES window, rather than passing raw asked values directly to SetThreadPriority.

Addresses #282 (Pass #8 [P2] #1).

Changes

  • crates/victory-hle/src/modules/kernel.rs:
    • Added startup_restore_priority(asked, max) computing held_at(title_priority(asked, false, true), max).
    • Updated give_back_startup_raises() to apply startup_restore_priority(asked, p_max).
    • Added unit test startup_restore_priority_respects_cap_and_priority_max.

Rig Specs Tested On

  • CPU: Linux workstation (x86_64)
  • GPU & VRAM: N/A (Windows-only victory-hle crate; full clippy & tests verified on GitHub Actions windows-latest CI)
  • System RAM: N/A
  • OS & GPU Driver: Linux (x86_64) — Windows x86_64-pc-windows-msvc CI verifies compilation, clippy, and unit tests

Run Settings & Profile

  • Build & Commit SHA: rebased on origin/main
  • Console Profile & Internal Resolution / Scale: N/A
  • Ray Tracing: N/A
  • Upscaling: N/A
  • Frame Generation: N/A
  • Launcher Command / Preset & Extra VICTORY_* Overrides: N/A
  • Scene / Area & Session Length: N/A

Measurements & Verification

  • Base FPS (without Frame Gen): N/A
  • Frame-Gen FPS (if enabled): N/A
  • VRAM / RAM Usage: N/A
  • Crashes / DRED Resets: N/A
  • Automated Checks:
    • cargo clippy --workspace --all-targets --locked -- -D warnings (verified on GitHub Actions windows-latest CI)
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings (verified on GitHub Actions windows-latest CI)
    • cargo test --locked -p xtask -> 8 passed, 0 failed
    • cargo xtask policy -> asset policy: 349 files ok
    • cargo test --workspace --exclude victory-gpu --exclude victory-shader --locked (verified on GitHub Actions windows-latest CI)
**@⁠RUIZ-Enrique-25002136** on GitHub · 2026-12-03 07:52 UTC · [original](https://github.com/Androtim/MiniVI/pull/377) `RUIZ-Enrique-25002136:fix/kernel-startup-priority-cap` → `main` · +25 −1 · 1 files · 1 commits · merged 2026-12-03 08:02 UTC ## Summary Applies the post-window `cap = true` rule and `VICTORY_TITLE_PRIORITY_MAX` cap (`held_at`) when `give_back_startup_raises()` restores thread priorities at the end of a `VICTORY_STARTUP_PRIORITIES` window, rather than passing raw `asked` values directly to `SetThreadPriority`. Addresses #282 (Pass #8 `[P2]` #1). ### Changes - **`crates/victory-hle/src/modules/kernel.rs`:** - Added `startup_restore_priority(asked, max)` computing `held_at(title_priority(asked, false, true), max)`. - Updated `give_back_startup_raises()` to apply `startup_restore_priority(asked, p_max)`. - Added unit test `startup_restore_priority_respects_cap_and_priority_max`. ## Rig Specs Tested On - **CPU:** Linux workstation (`x86_64`) - **GPU & VRAM:** N/A (Windows-only `victory-hle` crate; full clippy & tests verified on GitHub Actions `windows-latest` CI) - **System RAM:** N/A - **OS & GPU Driver:** Linux (`x86_64`) — Windows `x86_64-pc-windows-msvc` CI verifies compilation, clippy, and unit tests ## Run Settings & Profile - **Build & Commit SHA:** rebased on `origin/main` - **Console Profile & Internal Resolution / Scale:** N/A - **Ray Tracing:** N/A - **Upscaling:** N/A - **Frame Generation:** N/A - **Launcher Command / Preset & Extra `VICTORY_*` Overrides:** N/A - **Scene / Area & Session Length:** N/A ## Measurements & Verification - **Base FPS (without Frame Gen):** N/A - **Frame-Gen FPS (if enabled):** N/A - **VRAM / RAM Usage:** N/A - **Crashes / DRED Resets:** N/A - **Automated Checks:** - [ ] `cargo clippy --workspace --all-targets --locked -- -D warnings` (verified on GitHub Actions `windows-latest` CI) - [ ] `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` (verified on GitHub Actions `windows-latest` CI) - [x] `cargo test --locked -p xtask` -> 8 passed, 0 failed - [x] `cargo xtask policy` -> `asset policy: 349 files ok` - [ ] `cargo test --workspace --exclude victory-gpu --exclude victory-shader --locked` (verified on GitHub Actions `windows-latest` CI)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 07:57:42 +00:00
github-bot changed target branch from main to gh-pr/377/base 2026-12-03 08:03:15 +00:00
github manually merged commit 5c4bea0c93 into gh-pr/377/base 2026-12-03 08:03:16 +00:00
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/Androtim--MiniVI!377
No description provided.