Skip to content

gpu: test texture hashing budgets without pass deadlines - #73

Merged
simnJS merged 1 commit into
mainfrom
gpu/test-texture-hashing-budgets
Nov 25, 2026
Merged

simnJS merged 1 commit into
mainfrom
gpu/test-texture-hashing-budgets

Conversation

@fogydes

@fogydes fogydes commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

What and why

The texture hashing-budget regression also depended on the pass's 8 ms upload deadline. On a loaded machine, staging its 4 MiB texture can consume that deadline before the small texture is visited, so an assertion about byte-budget scheduling fails for elapsed-time reasons.

Route the two pass deadline checks through a helper with a test-only thread-local override. The hashing-budget test disables elapsed-time cutoffs on its own thread while retaining the byte budget. An RAII guard restores the previous setting, including nested use. Production deadlines and thresholds remain unchanged.

Part of: #54. Other flaky tests tracked there remain outside this change.

Depends on: none.

Area

crates/xtp-gpu/src/draw.rs: pass deadline checks, hashing-budget regression, and guard-restoration test.

Tests

  • cargo xtask pr-check passes on my machine.
  • New or changed behaviour has tests that need no game files.
  • Ran on a title: no.

The guard-restoration test uses an already-expired instant, without sleeps, to check normal, nested-guard, and restored behavior.

On the original patch before its unchanged rebase, both target tests passed standalone and in all 40 parallel WARP library runs. Complete suites passed in 27 of those runs; 13 runs failed in other tests (15 failures total). Those failures are retained in the local evidence and are not claimed fixed by this PR.

Fresh validation of rebased head 749233d on fafebe9: strict serial WARP diagnostics passed 633 unit and 3 integration tests; the normal-thread WARP six-stage PR check passed. The first full-check process was interrupted during compilation without an exit marker; the complete resumed check passed with no source edits. Sources were touched and compilation paths, new test names, and binary freshness were checked. The unchanged patch is confirmed by range-diff. No title or hardware run.

Provenance

  • I wrote all of this change myself for XTP, or it only moves code already in XTP.
  • Some of it comes from elsewhere. Each source, its licence and the files concerned are listed here, and every licence is compatible with GPL-3.0-or-later:

AI assistance: Codex diagnosed the timing dependence, implemented and reviewed the scoped test override, and ran the synthetic checks. No external code was copied or translated. I answer for every line.

Checklist

  • No game data, keys, console SDK code or headers, and nothing that circumvents DRM (asset policy).
  • No code copied from xcl or AnyPS5.
  • I agree to license this contribution under GPL-3.0-or-later.
  • Title and every commit follow <area>: <summary>; one topic; under 400 changed lines.
  • Docs updated where behavior, commands or variables changed (test-only behavior is explained in the test).

@github-actions github-actions Bot added area/gpu touches crates/xtp-gpu size/S 10 to 99 changed lines labels Nov 25, 2026
@fogydes
fogydes requested a review from simnJS November 25, 2026 16:32

@simnJS simnJS left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed:

  • the deadlines are unchanged outside tests;
  • the guard restores correctly;
  • the test now isolates the byte budget.

The only red check is raw_views_a_submission_in_flight_may_read_stay_until_it_has_run, a known #54 flake outside this diff. I'm rerunning it and will merge once it's green.

@fogydes

fogydes commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

CI follow-up on exact head 749233d: test failed in descriptor::host::tests::raw_views_a_submission_in_flight_may_read_stay_until_it_has_run (the old window, untouched). The two changed draw tests passed; the strict debug-layer job and both Clippy jobs also passed.

This is the same descriptor test recorded twice in the original 40-run stress batch and disclosed in issue #54. This PR does not change descriptor/host.rs; fetched main has no newer fix to that file. I have kept the failed run as evidence instead of treating a rerun as a fix. The local fresh full check passed, but remote CI is currently red, so this PR is not merge-ready. The descriptor-owner follow-up in #54 still applies.

AI assistance: Codex inspected the Actions failure and compared it with the preserved stress results.

@simnJS
simnJS merged commit 04257b4 into main Nov 25, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/gpu touches crates/xtp-gpu size/S 10 to 99 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants