Skip to content

Join deferred depth declarations to measured sweep coverage by FSSM identity - #6589

Open
kacper-serewis wants to merge 2 commits into
ItsNotRexed:mainfrom
kacper-serewis:feat/deferred-depth-sweep-coverage
Open

kacper-serewis wants to merge 2 commits into
ItsNotRexed:mainfrom
kacper-serewis:feat/deferred-depth-sweep-coverage

Conversation

@kacper-serewis

Copy link
Copy Markdown
Contributor

TEST-PS-DEPTH-COVERAGE claim
Depends on: #5657
Depends on: #6458
Depends on: #6501

Review commit 272a397 above #5657. Run python -I tools/deferred_depth_coverage.py <dxbc> <translation> [--results <original-sweep-tag-dir>]. The tool hashes the complete unpacked default FSSM payload from each deferred PS container declaring SV_Depth, joins the translation index across renames, and inspects the indexed SPIR-V for the translator's FragDepth decoration. Optional measurement counts use the original sample order, successful depth result row and full-size D32 readback(s). Supply the translation inventory and original sample belonging to the tag. Legacy logs store positions and do not authenticate those inputs. Output is aggregate only.

Windows CPU-only, AMD Ryzen 5 9600X. All 3,014 deferred PS entries checked. Seven declared depth (four with one colour, one with two, two with three), seven distinct payloads. Fresh CPU disassembly from those seven unpacked payloads yielded seven clean listings and seven translations passing spirv-val, each declaring FragDepth. All seven require descriptors. Three list bindings 0/1/2, two also list 3/5, and two also list 3/5/6. Zero meet the descriptor-free input condition of the previous measured cohort. Broader runner compatibility with supplied resources is unverified.

Independently unpacked the six sampled containers and checked every payload against the parent and head index hashes. Each of the four historical tags had six successful depth readbacks, with zero of the seven deferred identities in either inventory or either report. The existing six-pair measurements describe a disjoint cohort.

Passed synthetic renamed, ambiguous, missing identity/readback tests, existing G-buffer census and text line-ending tests, Python compilation and diff checks. AI-assisted. No GPU run.

@kapitche

Copy link
Copy Markdown
Contributor

Tested 272a397 merged with main c495e11 on Linux/Python 3.12.16: pass (one minor test gap)

Note: the branch has two commits (b0e4e660b G-buffer census, then 272a39705) because it is stacked on the census work (the same b0e4e660b is under #6726). tools/gbuffer_census.py, tests/test_gbuffer_census.py and the feature_scan.signature_offsets refactor are new relative to main, so this result covers both commits; the merge was clean. Whichever of #6726 / #6589 lands second will need rebasing over the shared commit.

Commands (git merge --no-edit of the PR head onto upstream/main), each as ~/src/Leonida/.venv/bin/python -I tests/<file>:

  • test_deferred_depth_coverage.py (2 tests) OK; test_gbuffer_census.py OK; test_feature_scan.py (0 failed checks, 0 failed tests); test_feature_scan_bad_index.py, test_feature_scan_order.py, test_inner_coverage_metadata.py, test_runner_calls_all_tests.py: all OK.
  • Negative controls by mutation (the tool is new, so there is nothing to revert to):
    • tools/deferred_depth_coverage.py: the ambiguity condition multiplicity[digest] > 1 or len(matches) > 1 replaced by False. test_duplicate_and_missing_identity then errors (ValueError: too many values to unpack (expected 1)), so the test discriminates it. Reverted.
    • Same file: the readback plane size check p.stat().st_size == 32 * 32 * 4 replaced by True. All tests still pass, so a wrong-sized .raw.depth plane is not covered by any test (the "missing readback" test only exercises a missing file). Reverted; tree clean.

Not run: the real shader carve and sweep results (game data / GPU), so the counts in the PR body are unverified by me.

Diff read: no other concern. A truncated or oversized depth plane being counted as depth_measured is the only behaviour I could change without a test noticing, hence the suggestion to add one case with a wrong-sized plane.

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.

2 participants