Skip to content

ps_sweep: reject incomplete readbacks in cross-GPU comparisons - #6586

Open
Solthodox wants to merge 2 commits into
ItsNotRexed:mainfrom
Solthodox:fix/ps-sweep-readback-size
Open

Solthodox wants to merge 2 commits into
ItsNotRexed:mainfrom
Solthodox:fix/ps-sweep-readback-size

Conversation

@Solthodox

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue: validate default pixel-sweep readbacks.

What and why

Two successful worker records and two empty files yield OK on both in the default ps_sweep.py compare on main. The comparison only checks that the decoded float arrays have equal lengths; it can also discard trailing bytes. That can present an incomplete capture as evidence that two GPUs agree.

Check the actual worker contract: both records must describe the same 1–8 render targets and each output must have exactly 32 × 32 × 16 bytes per RGBA32F target. Report invalid readback for missing files or bad shapes. A worker failure/timeout still takes precedence without opening a raw file. Valid outputs still use the same float tolerance; nothing in the Vulkan worker changes. This is not the separate --exact mode proposed by #5678.

Tested

AI-assisted: yes.

  • No game data, keys or decryption. Only synthetic counts, floats and test artifacts.
  • Translator contract: not applicable; no translation rule changed.

Validate the recorded RGBA32F target count and exact raw length before comparing floats.
Keep unreadable evidence distinct from an observed difference between GPUs.

@SirKingg SirKingg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Independent Windows review of d00ddbb: no blocking findings. Checked the worker's target packing and dimensions, result/timeout precedence, exact shape checks, float comparison and CLI/rerun handling.

  • python -I tests\test_ps_sweep.py: 12 tests passed.
  • python -I tools\ps_sweep.py --help: passed.
  • python -I - with a separate synthetic stdlib harness: reproduced empty/empty as OK using the merge-base classifier; ran the actual compare CLI with variant t and custom tags through 17 shape, missing-file, status, target-count, last-target, tolerance and non-finite controls. All passed. A missing result produced a nonzero exit and explicit diagnostic.

No game files, Vulkan worker or GPU were used; no GPU/driver behavior was validated. Exact byte length detects incomplete/oversized captures, not corruption within a complete capture. Review and synthetic validation were AI-assisted.

@whattheflop

Copy link
Copy Markdown
Contributor

Independent AI-assisted Windows CPU review of d00ddbb5 at base 1cc6e3c1, including a clean integration with exact #6501 503a71b1 and its stack. Added comparison coverage for complete 1- and 8-target runs, and for first/second color and depth captures lost during saving.

Complete two-clear pairs stayed OK on both. Missing or short first color readbacks stayed invalid readback. Missing second color or either depth plane reported depth missing, and short ones reported depth incompatible. A failed worker with absent or empty output kept the failure or timeout classification. Main alone still reports OK on both for an empty pair and raises for a missing file.

With uv CPython 3.12.13, all 12 stock tests passed at head and the combined suite had 20 passes and two skips. This is the default comparison path with synthetic saved outputs. No GPU or --exact run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants