Commit Graph

14 Commits

Author SHA1 Message Date
9a0a1a2d5f Preserve exact integral decimal counters in shader statistics 2026-11-23 13:30:44 -08:00
a67f8bf3b9 shader_stats: omit growth ratios with zero original instructions (#6771)
Squash-merged after diff review of PR #6771 - shader_stats: omit growth ratios with zero original instructions
2026-11-23 09:58:37 -06:00
398f41f134 Merge pull request #4606 from AGInformatique81
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:16:22 -05:00
259a576034 Reject extra unheaded fields in shader statistics rows 2026-11-23 04:06:41 +01:00
1741a03155 Reject broken quoted rows in shader_stats CSV 2026-11-22 23:18:32 +01:00
fea373d6c4 Merge pull request #3223 from Marco Luzzaro 2026-11-22 15:15:56 -05:00
fb7b355e53 shader_stats: the stdout guard too, now that #2135 is merged
It was left out of this change while #2135 was open on the same file. With the guard added it leaves the
test's list of exceptions, which now holds only run_wine_tests.py.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
2026-11-22 23:01:10 +03:00
1a8a3cd9b8 Report unreadable shader stats listings 2026-11-22 20:44:17 +01:00
318bbb0cac Merge pull request #2172 from Vonsek 2026-11-22 11:42:28 -05:00
960eda9350 fix(stats): count VGPRs in non-contiguous image operands
The listing parser represents image address lists separately from ordinary register ranges. Include their highest register so the reported original span is comparable with the driver count.
2026-11-22 17:11:40 +01:00
c590469693 shader_stats: --help exits 0, and an unknown option is refused instead of ignored
`-h`/`--help` printed the usage to stderr with exit code 1, and any other `--` option was dropped without a
word: `--detail` (a typo for `--details`) printed the summary with exit code 0. Help now goes to stdout with
exit code 0, and an unknown option or a wrong argument count is a usage error with exit code 2, as in the
other hand-parsed tools.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
2026-11-22 19:00:56 +03:00
324b814a38 shader_stats.py: diagnose missing statistics CSV columns 2026-11-22 13:18:55 +01:00
8987269414 Report available shader statistics across drivers 2026-11-21 20:55:26 -07:00
f577bf0318 vk_pipeline_check --stats: the driver's statistics for each translated shader
vk_pipeline_check <spirv dir> --stats FILE enables VK_KHR_pipeline_executable_properties, creates the
pipelines with CAPTURE_STATISTICS and writes, for the executable that runs each translated shader (not
the partner stub's), every statistic the driver reports as CSV rows name,stage,statistic,value. On RADV:
instructions, VGPRs, SGPRs, spills, scratch size, waves per SIMD, and more.

scripts/shader_stats.py <stats.csv> <disasm dir> [--details] compares them with the original RDNA
listings: code growth, VGPRs against the highest VGPR the original uses, and which shaders use scratch or
spill (a register file that went to memory, e.g. through v_movrels with an unbounded index). Over the
corpus it says how many shaders compile badly.

RX 5700 XT (RADV), the repository's test shaders: 47 pipelines, no scratch or spills in any.
New tests/test_shader_stats.py (standard library only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 21:06:49 -06:00