Repository navigation
Conversation
…erredTextured The mrt0 row described the alpha from 'the sampled 6-target variant' (ubyte0 x 1/255); over all 371 six-target variants that form is 98, an integer x 1/255 is 102, a float product 161. The mrt4 form (vN, vN, off, off compr for mask 0x3) holds in 584/584. tools/gbuffer_export_census.py reproduces the counts; tests on synthetic listings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested 984d8ef merged onto main 51e7c9d on Windows 11 Pro, Intel i7-14700KF, CPython 3.11.0 (venv: pytest 9.2.0, numpy 2.4.6, Pillow 13.0.0; numpy is below the 2.5.5 pin because 2.5 needs Python 3.12), CPU only: pass, with notes.
Review note:
AI-assisted (Claude Code). |
…irst operand written() treated every opcode outside NO_DEST as writing ops[0]. s_cmp*/s_cmpk*/s_bitcmp* write only SCC, v_cmpx_* only EXEC, v_cmp_*_e32 VCC (an SGPR mask only in the three-operand e64/sdwa form), so an inserted compare could replace the real producer of the alpha. Also: the VOP3b second SGPR destination (rdna2spirv.VOP3_TWO_DESTS), returning vs non-returning atomics and ds_*, and the remaining stores and scalar housekeeping opcodes. Tests per compare form with hand-written sequences. The census over all 807 PS_DeferredTextured listings is unchanged, so docs/gbuffer.md is too. AI-assisted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks, duudiis, that was a real bug. Fixed in 6b17729. What changed (
Tests ( Corpus counts: unchanged. I re-ran Also run: AI-assisted (Claude Code). |
|
Tested What passes
Blocking finding
AI-assisted. |
…in__ test_tool_stdout_encoding.test_every_main_block_reconfigures_stdout listed the tool as missing the guard. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Fixed the blocking finding in 0ee8f79: Results (Windows, CPython 3.x, CPU only, no game files):
The AI-assisted. |
|
Tested 0ee8f79 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass. Ran the test files this PR adds or changes, from a clean checkout of the PR head: AI-assisted (Claude Code). |
PROC-262. Claim: #5156 (comment)
Pairs with #5169: the two rows changed here are in the copy of section 2 that #5169 keeps (its leftover first copy, which #5169 removes, also says "in 6-target variants
apacks a byte"). The diffs touch different lines.What the doc said
docs/gbuffer.mdsection 2:mrt0: "in the sampled 6-target variantapacks a byte extracted from an integer register (ubyte0) and scaled by1.0 / 255.0".mrt4: "in the sampled 5- and 6-targetPS_DeferredTextureddisassembly withmask = 0x3, exported asexp mrt4, vN, vN, off, off compr".What was measured (all 807
PS_DeferredTexturedlistings of 1.0.2.1)Target counts come from each container's
OSG1: 56 three-target, 380 five-target, 371 six-target. Each has oneexp mrt0, and the five- and six-target ones oneexp mrt4.mrt0alpha, six-target (371): 98 are a byte (v_cvt_f32_ubyte0) ×1/255, 102 an integer (v_cvt_f32_u32) ×1/255, 161 a float product with no1/255and 10 other. The sampled form holds in about a quarter of them.mrt0alpha, five-target (380): 37 are a byte ×1/255, 157 an integer ×1/255and 186 a select or move.mrt4: 584/584 withOSG1mask0x3(380 five-target, 204 six-target) exportvN, vN, off, off compr; the 167 six-target with mask0xFexport all four,compr. The sampled statement holds for all of them.Method and limits
tools/gbuffer_export_census.py(new, standard library): follows theexp's packed register to itsv_cvt_pkrtz_f16_f32, the alpha source to its writer, and a multiply by0x3b808081(inline or moved into the register) one step further. "Writer" is the nearest earlier writer in listing order, not a data-flow solution. When a label or branch lies on that path, the result is counted ascrosses. That is 31 six-target and 24 five-target alphas; among the byte and integer ones, only 12 five-target integer alphas. The doc says so.os.listdir. The output is counts only, and no shader name is printed (a test checks this).Changes
docs/gbuffer.md: themrt0andmrt4rows, plus one paragraph with the command and the limit.tools/gbuffer_export_census.py: new.tests/test_gbuffer_export_census.py: 11 tests on hand-written listings and syntheticOSG1containers. They cover byte/other-byte/legacy multiply, a scale moved into an SGPR, a lookalike constant one ulp from 1/255 (counted as a float product), a later overwrite of the scale register, a label crossing, range writes, alphaoff/uncompressed, a dot-named listing (counted) and a non-matching one (skipped), CLI counts-only output, and a missing directory.Run
python -I tools/gbuffer_export_census.py <work>/shaders/dxbc/disasmgives the counts above.python -m compileall -q make_game.py tools tests,tests/test_gbuffer_export_census.py(11 OK), alltests/test_docs_*.py,tests/test_text_write_line_endings.pyandscripts/check_no_game_data.pypass.AI-assisted (Claude Code). No GPU needed. Counts and ISA opcode names only; no shader names or content.
🤖 Generated with Claude Code