You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a reproducible G-buffer cohort census CLI - #5657
Run python -I tools/gbuffer_census.py <dxbc> [--disasm <listing-directory>] to print aggregate JSON for indexed pixel shaders. Each cohort names its predicate. The report counts OSG1 rows, colour and depth declarations, detailed layouts and observed static compressed/uncompressed exports per MRT. Observations include readable instructions in partial listings. Coverage counters track the independent signature and listing denominators.
Validated on Windows, Python 3.13.15, CPU only. The synthetic census test, feature_scan regression suite and Python compilation passed. The normal CLI read all 12,101 indexed retail PS signatures. Of the six-row signatures, 1,702 declared six colour targets and one declared five colours plus depth. The entry-name and stem predicates yielded 3,014 and 3,004 shaders with 16,358 and 16,306 observed colour exports respectively. Seven listings in each cohort reported incomplete coverage. The historical 2,989 count did not reproduce.
Tested b0e4e660b6 on Linux (Debian 13), Python 3.13.5: pass, mutations caught.
pytest tests/test_gbuffer_census.py -q: 1 passed (7 assertions through subTest-like checks); pytest tests/test_feature_scan.py -q: 12 passed, so the signature_offsets/streams refactor keeps the existing scanner behavior (truncated tables still give an empty set, well-formed ones read the same).
Mutations: colour = shape["target"] → 0 fails the census test, and forcing complete = True fails it too, so both the denominator and the export-coverage sides are pinned.
The element decode (<4IBB2xI at offset + 8, i.e. SemanticIndex/SystemValueType/ComponentType/Register/Mask/ReadWriteMask/MinPrecision of a 32-byte element) matches docs/gbuffer.md's "register, semantic_index, component_type, mask, min_precision"; the system mapping (64/65/67/68) is the same one the doc's target/depth rows come from.
Tested b0e4e66 merged with main 561b65a on Linux (WSL2) x86_64, Python 3.12.16 (-I): concern
tests/test_gbuffer_census.py: 1 run, 1 passed, 0 failed. Existing tests that import feature_scan (test_feature_scan, test_feature_scan_bad_index, test_feature_scan_order, test_inner_coverage_metadata, test_runner_calls_all_tests): all OK. Negative control: with feature_scan.py and gbuffer_census.py from main the test cannot import (ImportError: cannot import name 'signature_offsets'); with the PR's files it passes. Concern (reproduced): python -I tools/gbuffer_census.py /nonexist ends in a FileNotFoundError traceback (exit 1) from census() reading <dir>/index.json, where the other tools in tests/test_missing_input_exit_codes.py print one ERROR: line and exit 2. The CLI is not covered by the new test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracker item BUILD-1829. Claim receipt, first implementation item. Related documentation PR #5350.
Run
python -I tools/gbuffer_census.py <dxbc> [--disasm <listing-directory>]to print aggregate JSON for indexed pixel shaders. Each cohort names its predicate. The report counts OSG1 rows, colour and depth declarations, detailed layouts and observed static compressed/uncompressed exports per MRT. Observations include readable instructions in partial listings. Coverage counters track the independent signature and listing denominators.Validated on Windows, Python 3.13.15, CPU only. The synthetic census test, feature_scan regression suite and Python compilation passed. The normal CLI read all 12,101 indexed retail PS signatures. Of the six-row signatures, 1,702 declared six colour targets and one declared five colours plus depth. The entry-name and stem predicates yielded 3,014 and 3,004 shaders with 16,358 and 16,306 observed colour exports respectively. Seven listings in each cohort reported incomplete coverage. The historical 2,989 count did not reproduce.
AI-assisted with Codex.