Skip to content

ps_sweep: separate observable and clear-only exact readback pairs - #5678

Open
kacper-serewis wants to merge 11 commits into
ItsNotRexed:mainfrom
kacper-serewis:feat/ps-sweep-readback
Open

kacper-serewis wants to merge 11 commits into
ItsNotRexed:mainfrom
kacper-serewis:feat/ps-sweep-readback

Conversation

@kacper-serewis

Copy link
Copy Markdown
Contributor

Claim #5581, first item in comment 7099980676, pending item ID.
Depends on: #4847

Adds compare --exact --tags native fallback to the sweep driver. It compares raw RGBA32F attachment bytes, splits observable and clear-only matches, and reports missing, incompatible and mismatched draw pairs. Rows follow the shared sample order and carry the exit codes and attachment classes. A successful pair must have the same target count and both files must have the expected byte length. Review commit 4eb16d8 for the change on top of the dependency.

AI-assisted. On Windows, all 19 ps_sweep tests and 3 text line-ending tests passed. Synthetic controls cover mixed MRT outputs, signed zero, missing records/files, inconsistent counts, equally truncated/oversized files and a failed rerun with stale output.

Fresh draws using the existing private translated cache and #4847 worker on NVIDIA GeForce RTX 5070, driver 616.56. Both zero-texture and gradient variants had 10 non-clear exact and 6 clear-only exact draw pairs each. Per variant, 36 of 49 attachment pairs were non-clear exact and 13 were clear-only exact. No missing, incompatible or mismatched pairs. These results cover this 16-shader sample only. No raw package used.

@tahffo68hk-hash

Copy link
Copy Markdown

CPU-only follow-up on 4eb16d819: the new exact path rejects malformed readbacks, but the same inputs still count as agreement in the default compare path (also reproduced on main 561b65a83). I used one synthetic sample with two exit-0 records declaring one target. At 32×32 RGBA32F the expected size is 16,384 bytes per file:

Actual bytes on A / B Default compare Exact comparison
16,384 / 16,384 with equal pixel values OK on both non-clear exact
0 / 0 OK on both incompatible
16 / 16 with equal pixel values OK on both incompatible
16,384 / 16,385 with equal pixels plus one trailing byte OK on both incompatible

The default path compares float counts after dropping any partial float. The target-count and byte-size checks from the exact path could also protect the default report before it compares pixels. This is a pre-existing gap in default mode and can be tracked as a follow-up if the exact-only scope is intentional. Windows, synthetic fixtures only, AI-assisted.

在 4eb16d819 上做了仅 CPU 的补充验证。新增的精确比较会拒绝格式错误的读回文件,但相同输入在默认 compare 路径仍被计为一致(在主分支 561b65a83 也能复现)。我使用一个合成样本,两条记录都以退出码 0 声明一个渲染目标。32×32 RGBA32F 的预期大小是每个文件 16,384 字节。

A / B 的实际字节数 默认比较 精确比较
16,384 / 16,384,像素值一致 OK on both non-clear exact
0 / 0 OK on both incompatible
16 / 16,像素值一致 OK on both incompatible
16,384 / 16,385,像素一致但 B 多一个尾部字节 OK on both incompatible

默认路径丢弃不足一个浮点数的尾部后才比较浮点数数量。可以复用精确路径的目标数量和字节长度检查,在比较像素前保护默认报告。默认模式原先就有这一缺口,如果该 PR 有意只处理精确模式,可以单独跟进。Windows,仅使用合成输入,AI 辅助。

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