GPU: avoid fully sorting due texture queues #733

Open
github-bot wants to merge 1 commit from github-bot/gh-733 into main AGit
Owner

@⁠user2949 on GitHub · 2026-11-25 05:52 UTC · original
user2949:codex/texture-queue-partial-selection → main · +91 −11 · 1 files · 1 commits · open

Why

TextureQueue::due sorts every due slot, though it returns at most 4,096. The code documents backlogs of 25,000–40,000; sorting entries that cannot be served this pass adds CPU work before the upload budget starts.

What changed

Partial selection preserves the existing priority and newest/oldest alternation while sorting only entries returned. A regression test compares the selection with the previous full-sort behavior across a large mixed backlog.

Reported performance

User-reported current test: about 0.5 FPS on an Intel Core i7-14700F, AMD Radeon RX 6600 XT, and 32 GB DDR5 RAM; the game remains unplayable at that speed. This is not a controlled before/after measurement, so it does not establish how much this change affects FPS.

Tested

  • cargo test --workspace --locked -- --test-threads=4 passed on Windows.
  • cargo clippy -p victory-gpu --all-targets --locked passed with existing warnings.
  • Strict -D warnings Clippy remains blocked by existing main-branch warnings.
  • No controlled in-game before/after benchmark.

Assisted by ChatGPT Codex (GPT-6).

**@⁠user2949** on GitHub · 2026-11-25 05:52 UTC · [original](https://github.com/fxceless/victory-fork/pull/733) `user2949:codex/texture-queue-partial-selection` → `main` · +91 −11 · 1 files · 1 commits · open ## Why `TextureQueue::due` sorts every due slot, though it returns at most 4,096. The code documents backlogs of 25,000–40,000; sorting entries that cannot be served this pass adds CPU work before the upload budget starts. ## What changed Partial selection preserves the existing priority and newest/oldest alternation while sorting only entries returned. A regression test compares the selection with the previous full-sort behavior across a large mixed backlog. ## Reported performance User-reported current test: about 0.5 FPS on an Intel Core i7-14700F, AMD Radeon RX 6600 XT, and 32 GB DDR5 RAM; the game remains unplayable at that speed. This is not a controlled before/after measurement, so it does not establish how much this change affects FPS. ## Tested - `cargo test --workspace --locked -- --test-threads=4` passed on Windows. - `cargo clippy -p victory-gpu --all-targets --locked` passed with existing warnings. - Strict `-D warnings` Clippy remains blocked by existing main-branch warnings. - No controlled in-game before/after benchmark. Assisted by ChatGPT Codex (GPT-6).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:49:53 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/descriptor/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/733/head:github-bot/gh-733'
git switch 'github-bot/gh-733'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-733'
git switch 'github-bot/gh-733'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-733'
git switch 'github-bot/gh-733'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-733'
git switch 'main'
git merge --squash 'github-bot/gh-733'
git switch 'main'
git merge --ff-only 'github-bot/gh-733'
git switch 'main'
git merge 'github-bot/gh-733'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.