tooling: the coverage chart cannot see gfx2hlsl, so forms it implements are reported as gaps #3515
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3515
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@KelboLive on GitHub · 2026-11-29 19:51 UTC · original
tooling: the coverage chart cannot see gfx2hlsl, so forms it implements are reported as gaps
Summary
The instruction-coverage chart counts forms exercised by passing fixtures. Only
tests/pixel_aot_check.pyand thecompute_store_aot_*fixtures writeFORM_COVERAGE_RECORD, so gfx1013 forms are only counted whentools/pixel_aot.pyor thedirect-compute path accepted them.
tools/startup/gfx2hlsl.py— the translator thathandles a title's shaders at run time — writes no records at all.
A form that
gfx2hlsllowers, butpixel_aotdoes not, is therefore reported asunobservedeven though the runtime supports it.Example
s_cbranch_vccz,s_cbranch_vccnzands_cbranch_execnzare listed as uncovered forgfx1013 (488 uncovered, all
unobserved, onmainc4b8a41bwith the dev preset).gfx2hlsllowers all three:tools/startup/gfx2hlsl.py:1152-1178(the vcc_hi rename fors_cbranch_vccz/vccnz),:1735(MESH_VCC_BRANCHES) and:4998(execnzbesideexecz).pixel_aotlowers onlys_cbranch_execz(tools/pixel_aot.py:4428). Feeding it theothers raises:
So the chart reports a gap for three forms the startup translator already handles.
Reproduction
Why it matters
The coverage denominator is a property of the ISA, but the numerator currently measures
two of the three translators.
gfx2hlslis the path a start-up run depends on, so thechart under-reports exactly where it matters most for title compatibility.
Every
unobservedrow should therefore be read as "no fixture proved this throughpixel_aot or direct compute", not as "the project does not support it". The subtitle
already says the chart is "not a measure of port completion"; this is a concrete case
where it is also not a measure of translator support.
Possible directions
gfx2hlslprograms. The translator already knows which lines itaccepted; a fixture that lowers a start-up capture could write those words to
FORM_COVERAGE_RECORD, under the same "record and test status from one run" rule.The open question is which fixture supplies the program: the startup tests work from
captured requests rather than an assembled listing.
covered each form, so a reviewer can tell "implemented in gfx2hlsl, untested" from
"implemented nowhere".
offline translators, say so where the chart is described, so
unobservedis not readas unsupported.
Scope
This is a measurement question, not a translation bug. Nothing here claims the three
branches are mistranslated; the claim is only that the chart cannot currently see that
they are translated at all. The exact share of the 488 gfx1013 and 392 gfx1030 gaps that
are measurement rather than implementation is unmeasured — a per-form classification is
the obvious next step.
@Not-Saii on GitHub · 2026-11-29 20:42 UTC · original
@KelboLive, unless you're planning to do this yourself, I'd like to take direction 1, with a small part of direction 2. @R0Y00, the issue leaves the direction open, so I'll wait for your OK on the approach below before opening a PR.
Proposal.
Record what
gfx2hlslaccepted, in its existing fixtures. I'd use the ruletests/pixel_aot_check.pyand thecompute_alu_*checks already follow:FORM_COVERAGE_RECORDis set, a check writes the first word of every line of each programgfx2hlsltranslated without an error;The
startup_gfx2hlsl_*_check.pyfixtures already assemble source-built programs and translate them on the CPU, so the issue's open question has an answer: these fixtures supply the programs.tests/writes the record.gfx2hlsla whole program, not into those that test a single emitter function. A record should mean "this program translated", not "this helper ran".FORM_COVERAGE_RECORDin CMake, like thecompute_store_aot_*tests. Only CPU-only variants record, so no GPU is needed.First batch: the issue's three forms. I'll start with the fixtures that cover
s_cbranch_vccz,s_cbranch_vccnzands_cbranch_execnz, then extend to the other whole-program checks in later batches.Show which translator covered each form (direction 2, the small part).
form_coverage.pyreports which family of records covered each form:pixel_aot, direct compute orgfx2hlsl. Then "implemented ingfx2hlsl" is visible, separate from "implemented nowhere". The denominator doesn't change.Tests.
tests/form_coverage_check.pygets cases for each of these:gfx2hlslrecord counts only when its test passed;unobservedand the count of forms that moved.If you'd rather keep the chart scoped to the offline translators (direction 3), say so, and I'll do the documentation change instead.
Environment: Windows 11 build 26300, MSVC (VS 2022, dev preset), Windows SDK 10.0.26100, Python 3.12. No GPU needed.
AI-assisted.
@KelboLive on GitHub · 2026-11-29 23:50 UTC · original
Not planning to take this one, so it is yours for direction 1 with whichever part of direction 2 you want — agreed that @R0Y00 should confirm the direction first, since the recording contract is the maintainers' call.
Two things from my side that may save you time:
Happy to measure or review once there is something to look at. I have the Agility tree and a full dev run set up, so re-running --gaps\ for all three ISAs is cheap if that helps you compare before and after.
@R0Y00 on GitHub · 2026-11-30 15:16 UTC · original
@Not-Saii Thanks for offering to take this on. Since we've deprecated
gfx2hlsl, let's go with direction 3. Please clarify that the chart covers passing fixtures forpixel_aotand the direct-compute path, and thatunobservedmeans those fixtures haven't covered the instruction form.