Repository navigation
vs_layout_census: confirm the VS input layout is legacy non-NGG per PAL hardware stage; measure the 195 ES variants - #6558
Open
abilliontokens wants to merge 1 commit into
Conversation
…easure the 195 ES variants scripts/vs_layout_census.py joins every tag-0x0D payload's PAL stage record (tools/pal_stages.py) with its code markers over the whole carve index, plus the entry VGPRs read before written for API-VS payloads. Over 1.0.2.1 (26,503 containers, 26,698 payloads): all 2,236 stage-4 VS payloads are legacy non-NGG (no exp prim / s_sendmsg / v_mbcnt, all export pos0+param), so v0 = VertexIndex (zero-based) is confirmed, not NGG; the 9,282 stage-7 payloads are the NGG/mesh ones. The 195 stage-2 payloads are the ES variants of the two-payload $VS_VoxelizeGeneric containers (no exp, LDS writes, v_mbcnt, entry VGPRs v5/v9-v11/v13-v14), which fssm_unpack's last-payload default leaves untranslated. docs/design.md gains the two contract rows and a PAL-stage cross-reference; docs/fssm_crosscheck.md records the measured hardware-stage split for the two-payload selection unknown.
2 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Claimed in the coordination issue as: #6214 (comment) (README bullet: "the vertex-shader input layout (
v0=VertexIndexis unverified if the console runs VS as NGG)")Depends on: none — builds on merged #4347 (
tools/pal_stages.py) and #436 (scripts/vs_input_survey.py); no open PR touches these files. The README bullet itself is edited by #4118 (README only, no overlap).What and why
The README bullet asks whether the console runs the vertex shader as NGG (which would put the VS inputs at
v5/v8and makev0=VertexIndexwrong). This PR answers it with a census over every tag-0x0D payload of the 1.0.2.1 corpus, joined with the PAL hardware-stage record of each payload:scripts/vs_layout_census.py(new): for each container's payloads, reads the PAL stage record (tools/pal_stages.py), the carve-index stage, the code markers (NGGexp prim/s_sendmsg MSG_GS_ALLOC_REQ/v_mbcnt,exp pos0/param, the fetch call) and, for API-VS payloads, the entry VGPRs read before written (scripts/vs_input_survey.read_before_write). The.slisting covers each container's last payload (the onefssm_unpack.pytranslates); unlisted payloads are disassembled with llvm-mc. Counts only,--jsonfor the full table.tests/test_vs_layout_census.py(new): 5 tests on hand-built DXBC/FSSM containers (synthetic bytes only).docs/design.md: two contract rows (VS input layout, per PAL hardware stage, VS as ES (two-payload VS containers)) and a cross-reference in PAL stage descriptors.docs/fssm_crosscheck.md: the two-payload selection unknown now records the measured hardware-stage split.Corpus counts (1.0.2.1, 26,503 containers / 26,698 payloads)
exp prim, nos_sendmsg, nov_mbcnt), every one exportspos0andparam. Sov0=VertexIndex(zero-based,DrawParameters) is confirmed, not NGG.s_sendmsg MSG_GS_OP_*+v_mbcnt, no position export.$VS_VoxelizeGenericcontainers: noexp(vertex outputs go to LDS for the GS),v_mbcntlane id, entry read-before-write VGPRsv5,v9–v11,v13–v14(neverv0/v3), no fetch call.fssm_unpack.pydefaults to the last payload, so the ES variant is untranslated; which payload a GS-bound pipeline selects is still open.v_mbcntin 332 / 266,s_sendmsgin 10 PS, noexp prim.Tested
Commit
b68703ac0(rebased on origin/main1cc6e3c12). No translator change, so there is no translate/spirv-val before-and-after: this is a static count over the carved corpus.Full-corpus census (CPU only, 735 s):
python -I scripts/vs_layout_census.py <work>/shaders/dxbc --json vs_layout_census.json: 26,503 containers, 26,698 payloads, 0 without a PAL record, 0 API-stage mismatches, 195 unlisted payloads disassembled. As a cross-check, a separate scan of the 26,503 listings fors_sendmsgfound it only in hardware stages 3 (195), 5 (10) and 7 (9,282), the same as the census.Windows 11 (10.0.26200), Python 3.12.10, CPU only: no GPU or driver involved.
AI-assisted: yes (omp orchestrator).
Checklist
docs/design.md, with how it was confirmed.